|
10 | 10 | #set($ghbug = 'https://github.com/tada/pljava/issues/') |
11 | 11 | #set($ghpull = 'https://github.com/tada/pljava/pull/') |
12 | 12 |
|
| 13 | +$h2 PL/Java 1.6.3 |
| 14 | + |
| 15 | +This is the third minor update in the PL/Java 1.6 series. It adds support |
| 16 | +for PostgreSQL 14, continues to improve the runtime behavior and |
| 17 | +the annotation-driven SQL generator, and fixes several bugs. Further information |
| 18 | +on the changes may be found below. |
| 19 | + |
| 20 | +$h3 PL/Java with Java 17 and later: JEP 411 |
| 21 | + |
| 22 | +Current versions of PL/Java rely on Java security features that will be affected |
| 23 | +by JEP 411, beginning with Java 17. Java 17 itself will continue to provide the |
| 24 | +needed capabilities, with only deprecation marks and warnings added. Java 17 is |
| 25 | +also positioned as a long-term support release, so the option of continuing to |
| 26 | +run this PL/Java release will be available, with no loss of function, |
| 27 | +by continuing to run with Java versions up to and including 17. |
| 28 | + |
| 29 | +For more on how PL/Java will adapt, please bookmark [the JEP 411 topic][jep411] |
| 30 | +on the PL/Java wiki. |
| 31 | + |
| 32 | +For this release, PL/Java will suppress a JEP 411-related warning from the |
| 33 | +Java runtime itself that would otherwise be emitted for every PostgreSQL backend |
| 34 | +that starts Java, and instead will issue a more informative "migration advisory" |
| 35 | +warning only on certain administrative actions no more than once per session, |
| 36 | +with a goal of ensuring that responsible administrators are aware of the |
| 37 | +expected future developments. The advisory message includes the URL to |
| 38 | +the wiki topic above. |
| 39 | + |
| 40 | +This release also adds code to detect if it is on a future, post-Java 17 runtime |
| 41 | +where the needed functionality is not available, and throw informative |
| 42 | +exceptions with suggested corrective actions. |
| 43 | + |
| 44 | +[jep411]: https://github.com/tada/pljava/wiki/JEP-411 |
| 45 | + |
| 46 | +$h3 Changes |
| 47 | + |
| 48 | +$h4 Changes affecting administration |
| 49 | + |
| 50 | +$h5 New function now created on update |
| 51 | + |
| 52 | +The new [`SQLJ.ALIAS_JAVA_LANGUAGE`][sqljajl] function introduced with 1.6 will now |
| 53 | +be present after an `ALTER EXTENSION UPDATE` if it was not before. |
| 54 | + |
| 55 | +$h5 Message if the Java runtime ends the backend process during startup |
| 56 | + |
| 57 | +The Java runtime can behave antisocially for some startup issues, such |
| 58 | +as a misspelled jar in `pljava.module_path`, and silently terminate the |
| 59 | +backend process rather than reporting an error. (It writes a message, not |
| 60 | +to standard error, but to standard output, which from a PostgreSQL backend |
| 61 | +is not captured for logging, and may never be seen.) A message is now generated |
| 62 | +in that case, to provide at least some clue what has gone wrong. |
| 63 | + |
| 64 | +[sqljajl]: pljava/apidocs/org.postgresql.pljava.internal/org/postgresql/pljava/management/Commands.html#alias_java_language |
| 65 | + |
| 66 | +$h4 Changes to runtime behavior |
| 67 | + |
| 68 | +$h5 Java's thread context class loader |
| 69 | + |
| 70 | +PL/Java now supplies a known value for the current Java thread's context |
| 71 | +class loader on entry to a PL/Java function. It is the class loader for the |
| 72 | +PostgreSQL schema where the function is declared. The context class loader is |
| 73 | +referred to by numerous Java libraries and by Java's `ServiceLoader` |
| 74 | +class, which may expect to find services and resources along the PL/Java class |
| 75 | +path that has been configured for the function. Neglecting to set the context |
| 76 | +class loader opened the door to unexpected loading failures like |
| 77 | +[issue #361](${ghbug}361) that can require awkward or slow contortions |
| 78 | +to work around in user Java code. |
| 79 | + |
| 80 | +This change is [documented in more detail](develop/contextloader.html). |
| 81 | +An opt-out setting is available. |
| 82 | + |
| 83 | +$h4 Improvements to the annotation-driven SQL generator |
| 84 | + |
| 85 | +$h5 Now able to declare function parameters that default to null |
| 86 | + |
| 87 | +It has been possible to annotate a function parameter with |
| 88 | +[`@SQLType(defaultValue=...)`][sqlt] to give it any non-null default value, |
| 89 | +but because Java disallows null annotation values, that notation wasn't |
| 90 | +usable to declare a parameter that defaults to null. The new notation |
| 91 | +[`@SQLType(optional=true)`][sqlt] means exactly that. |
| 92 | + |
| 93 | +$h5 Fixes a bug in synthesis of `COMMUTATOR`/`NEGATOR` operators |
| 94 | + |
| 95 | +It is now possible to code one method in Java and declare a full |
| 96 | +complement of operators based on it by combining commutation and negation. |
| 97 | +A [new example][egsyn4] is provided. |
| 98 | + |
| 99 | +[egsyn4]: https://github.com/tada/pljava/commit/6bd5aa0 |
| 100 | +[sqlt]: pljava-api/apidocs/org.postgresql.pljava/org/postgresql/pljava/annotation/SQLType.html |
| 101 | + |
| 102 | +$h3 Bugs fixed |
| 103 | + |
| 104 | +* [`ALTER EXTENSION UPDATE` does not create `sqlj.alias_java_language`](${ghbug}341) |
| 105 | +* [... fails on 4 cross-type operators by commute/negate from 1 function](${ghbug}343) |
| 106 | +* [Build failure dependent on `pg_config` output](${ghbug}347) |
| 107 | +* [Protection domain when validator runs initializer](${ghbug}342) |
| 108 | +* [Improve experience when `pljava.module_path` is incorrect](${ghbug}350) |
| 109 | +* ["Failed to recognize schema" possible during `pg_upgrade`](${ghbug}352) |
| 110 | +* Fixes and test coverage in `Lexicals.Identifier` serialization |
| 111 | +* [Segmentation fault during `autovacuum`](${ghbug}355) |
| 112 | +* [`java.nio.charset.MalformedInputException: Input length = 1`](${ghbug}340) |
| 113 | +* [Thread context class loader](${ghbug}361) |
| 114 | +* [`MappedUDT` and types with `typlen=-2`](${ghbug}370) |
| 115 | + |
| 116 | +$h3 Updated PostgreSQL APIs tracked |
| 117 | + |
| 118 | +* Regularized spelling of `pg_type` OID symbols |
| 119 | +* Changed TOAST pointer format supporting selectable TOAST compression methods |
| 120 | +* Demise of `ErrorData.show_funcname` (it was a vestige of frontend/backend |
| 121 | + protocol v2, long obsolete |
| 122 | + |
| 123 | +$h3 Credits |
| 124 | + |
| 125 | +Thanks to Krzysztof Nienartowicz, `ricdhen`, and `JanaParthasarathy`, who |
| 126 | +among them reported five of the issues fixed in this release. |
| 127 | + |
| 128 | +$h2 Earlier releases |
| 129 | + |
| 130 | +## A nice thing about using Velocity is that each release can be entered at |
| 131 | +## birth using h2 as its main heading, h3 and below within ... and then, when |
| 132 | +## it is moved under 'earlier releases', just define those variables to be |
| 133 | +## one heading level finer. Here goes: |
| 134 | +#set($h2 = '###') |
| 135 | +#set($h3 = '####') |
| 136 | +#set($h4 = '#####') |
| 137 | +#set($h5 = '######') |
| 138 | + |
13 | 139 | $h2 PL/Java 1.6.2 |
14 | 140 |
|
15 | 141 | This is the second minor update in the PL/Java 1.6 series, with two bugs fixed |
@@ -65,17 +191,6 @@ Thanks to Francisco Biete for the report of [#331](${ghbug}331). |
65 | 191 |
|
66 | 192 | [PassXML]: pljava-examples/apidocs/org/postgresql/pljava/example/annotation/PassXML.html#method.summary |
67 | 193 |
|
68 | | -$h2 Earlier releases |
69 | | - |
70 | | -## A nice thing about using Velocity is that each release can be entered at |
71 | | -## birth using h2 as its main heading, h3 and below within ... and then, when |
72 | | -## it is moved under 'earlier releases', just define those variables to be |
73 | | -## one heading level finer. Here goes: |
74 | | -#set($h2 = '###') |
75 | | -#set($h3 = '####') |
76 | | -#set($h4 = '#####') |
77 | | -#set($h5 = '######') |
78 | | - |
79 | 194 | $h2 PL/Java 1.6.1 (16 November 2020) |
80 | 195 |
|
81 | 196 | _Note: 1.6.1 was released with [a bug](${ghbug}331) likely to be a blocker |
|
0 commit comments