Stamp 14.22.
commit : 966473719c7f8067848dc79b58da0fb17ed136b1
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 23 Feb 2026 17:03:30 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 23 Feb 2026 17:03:30 -0500 M configure
M configure.ac
Translation updates
commit : 7917762558545fbe16c0c9e9b97b83a30c11eaa8
author : Peter Eisentraut <peter@eisentraut.org>
date : Mon, 23 Feb 2026 14:06:33 +0100
committer: Peter Eisentraut <peter@eisentraut.org>
date : Mon, 23 Feb 2026 14:06:33 +0100 Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: abd36b494cbc149993ae9127e3ce4d0e9c10ed7a M src/backend/po/de.po
M src/backend/po/ja.po
M src/backend/po/ru.po
M src/bin/pg_rewind/po/ru.po
M src/pl/plpgsql/src/po/ru.po
Release notes for 18.3, 17.9, 16.13, 15.17, 14.22.
commit : f4f0be89f0b82190c22df0d364edf8c9dc196578
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 22 Feb 2026 12:22:41 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sun, 22 Feb 2026 12:22:41 -0500 M doc/src/sgml/release-14.sgml
Fix test_valid_server_encoding helper function.
commit : 88fec079f13dae07a252339a74ed070284e94a20
author : Thomas Munro <tmunro@postgresql.org>
date : Tue, 17 Feb 2026 13:53:32 +1300
committer: Thomas Munro <tmunro@postgresql.org>
date : Tue, 17 Feb 2026 13:53:32 +1300 Commit c67bef3f325 introduced this test helper function for use by
src/test/regress/sql/encoding.sql, but its logic was incorrect. It
confused an encoding ID for a boolean so it gave the wrong results for
some inputs, and also forgot the usual return macro. The mistake didn't
affect values actually used in the test, so there is no change in
behavior.
Also drop it and another missed function at the end of the test, for
consistency.
Backpatch-through: 14
Author: Zsolt Parragi <zsolt.parragi@percona.com> M src/test/regress/input/encoding.source
M src/test/regress/output/encoding.source
M src/test/regress/regress.c
Suppress new "may be used uninitialized" warning.
commit : a0769e74d65dba80717255faf78b494692729d6b
author : Noah Misch <noah@leadboat.com>
date : Mon, 16 Feb 2026 18:04:58 -0800
committer: Noah Misch <noah@leadboat.com>
date : Mon, 16 Feb 2026 18:04:58 -0800 Various buildfarm members, having compilers like gcc 8.5 and 6.3, fail
to deduce that text_substring() variable "E" is initialized if
slice_size!=-1. This suppression approach quiets gcc 8.5; I did not
reproduce the warning elsewhere. Back-patch to v14, like commit
9f4fd119b2cbb9a41ec0c19a8d6ec9b59b92c125.
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/1157953.1771266105@sss.pgh.pa.us
Backpatch-through: 14 M src/backend/utils/adt/varlena.c
hstore: Fix NULL pointer dereference with receive function
commit : f604cc695cb52e2751710c890dbf10accffbd0c8
author : Michael Paquier <michael@paquier.xyz>
date : Tue, 17 Feb 2026 08:41:37 +0900
committer: Michael Paquier <michael@paquier.xyz>
date : Tue, 17 Feb 2026 08:41:37 +0900 The receive function of hstore was not able to handle correctly
duplicate key values when a new duplicate links to a NULL value, where a
pfree() could be attempted on a NULL pointer, crashing due to a pointer
dereference.
This problem would happen for a COPY BINARY, when stacking values like
that:
aa => 5
aa => null
The second key/value pair is discarded and pfree() calls are attempted
on its key and its value, leading to a pointer dereference for the value
part as the value is NULL. The first key/value pair takes priority when
a duplicate is found.
Per offline report.
Reported-by: "Anemone" <vergissmeinnichtzh@gmail.com>
Reported-by: "A1ex" <alex000young@gmail.com>
Backpatch-through: 14 M contrib/hstore/hstore_io.c
Don't reset 'latest_page_number' when replaying multixid truncation
commit : 547a8aaa7d4fffd686c75b1e00b1c11c0980aabc
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 16 Feb 2026 17:16:59 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Mon, 16 Feb 2026 17:16:59 +0200 'latest_page_number' is set to the correct value, according to
nextOffset, early at system startup. Contrary to the comment, it hence
should be set up correctly by the time we get to WAL replay.
This fixes a failure to replay WAL generated on older minor versions,
before commit 789d65364c (18.2, 17.8, 16.12, 15.16, 14.21). The
failure occurs after a truncation record has been replayed and looks
like this:
FATAL: could not access status of transaction 858112
DETAIL: Could not read from file "pg_multixact/offsets/000D" at offset 24576: read too few bytes.
CONTEXT: WAL redo at 3/2A3AB408 for MultiXact/CREATE_ID: 858111 offset 6695072 nmembers 5: 1048228 (sh) 1048271 (keysh) 1048316 (sh) 1048344 (keysh) 1048370 (sh)
Reported-by: Sebastian Webber <sebastian@swebber.me>
Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Discussion: https://www.postgresql.org/message-id/20260214090150.GC2297@p46.dedyn.io;lightning.p46.dedyn.io
Backpatch-through: 14-18 M src/backend/access/transam/multixact.c
M src/include/access/slru.h
pgcrypto: Tweak error message for incorrect session key length
commit : c60a58204435277b98af5d3aba945b424a4becb5
author : Michael Paquier <michael@paquier.xyz>
date : Mon, 16 Feb 2026 12:18:34 +0900
committer: Michael Paquier <michael@paquier.xyz>
date : Mon, 16 Feb 2026 12:18:34 +0900 The error message added in 379695d3cc70 referred to the public key being
too long. This is confusing as it is in fact the session key included
in a PGP message which is too long. This is harmless, but let's be
precise about what is wrong.
Per offline report.
Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Backpatch-through: 14 M contrib/pgcrypto/expected/pgp-pubkey-session.out
M contrib/pgcrypto/px.c
Fix SUBSTRING() for toasted multibyte characters.
commit : 14b1fd6176cb9353846deff607e5dfad09eb5b23
author : Noah Misch <noah@leadboat.com>
date : Sat, 14 Feb 2026 12:16:16 -0800
committer: Noah Misch <noah@leadboat.com>
date : Sat, 14 Feb 2026 12:16:16 -0800 Commit 1e7fe06c10c0a8da9dd6261a6be8d405dc17c728 changed
pg_mbstrlen_with_len() to ereport(ERROR) if the input ends in an
incomplete character. Most callers want that. text_substring() does
not. It detoasts the most bytes it could possibly need to get the
requested number of characters. For example, to extract up to 2 chars
from UTF8, it needs to detoast 8 bytes. In a string of 3-byte UTF8
chars, 8 bytes spans 2 complete chars and 1 partial char.
Fix this by replacing this pg_mbstrlen_with_len() call with a string
traversal that differs by stopping upon finding as many chars as the
substring could need. This also makes SUBSTRING() stop raising an
encoding error if the incomplete char is past the end of the substring.
This is consistent with the general philosophy of the above commit,
which was to raise errors on a just-in-time basis. Before the above
commit, SUBSTRING() never raised an encoding error.
SUBSTRING() has long been detoasting enough for one more char than
needed, because it did not distinguish exclusive and inclusive end
position. For avoidance of doubt, stop detoasting extra.
Back-patch to v14, like the above commit. For applications using
SUBSTRING() on non-ASCII column values, consider applying this to your
copy of any of the February 12, 2026 releases.
Reported-by: SATŌ Kentarō <ranvis@gmail.com>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Bug: #19406
Discussion: https://postgr.es/m/19406-9867fddddd724fca@postgresql.org
Backpatch-through: 14 M src/backend/utils/adt/varlena.c
M src/test/regress/input/encoding.source
M src/test/regress/output/encoding.source
pg_mblen_range, pg_mblen_with_len: Valgrind after encoding ereport.
commit : 44fc85bbf99029e83592d4992c1d700951e59875
author : Noah Misch <noah@leadboat.com>
date : Sat, 14 Feb 2026 12:16:16 -0800
committer: Noah Misch <noah@leadboat.com>
date : Sat, 14 Feb 2026 12:16:16 -0800 The prior order caused spurious Valgrind errors. They're spurious
because the ereport(ERROR) non-local exit discards the pointer in
question. pg_mblen_cstr() ordered the checks correctly, but these other
two did not. Back-patch to v14, like commit
1e7fe06c10c0a8da9dd6261a6be8d405dc17c728.
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/20260214053821.fa.noahmisch@microsoft.com
Backpatch-through: 14 M src/backend/utils/mb/mbutils.c
Fix plpgsql's handling of "return simple_record_variable".
commit : 2b93d382055b62e1493cfbb6c3b5547c1bb9ab82
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 11 Feb 2026 16:53:14 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 11 Feb 2026 16:53:14 -0500 If the variable's value is null, exec_stmt_return() missed filling
in estate->rettype. This is a pretty old bug, but we'd managed not
to notice because that value isn't consulted for a null result ...
unless we have to cast it to a domain. That case led to a failure
with "cache lookup failed for type 0".
The correct way to assign the data type is known by exec_eval_datum.
While we could copy-and-paste that logic, it seems like a better
idea to just invoke exec_eval_datum, as the ROW case already does.
Reported-by: Pavel Stehule <pavel.stehule@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAFj8pRBT_ahexDf-zT-cyH8bMR_qcySKM8D5nv5MvTWPiatYGA@mail.gmail.com
Backpatch-through: 14 M src/pl/plpgsql/src/expected/plpgsql_domain.out
M src/pl/plpgsql/src/pl_exec.c
M src/pl/plpgsql/src/sql/plpgsql_domain.sql
Fix pg_stat_get_backend_wait_event() for aux processes
commit : 82b495cdd7ec1e7bfcfa497ce2138d3ce5a8fa43
author : Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 11 Feb 2026 18:50:57 +0200
committer: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date : Wed, 11 Feb 2026 18:50:57 +0200 The pg_stat_activity view shows information for aux processes, but the
pg_stat_get_backend_wait_event() and
pg_stat_get_backend_wait_event_type() functions did not. To fix, call
AuxiliaryPidGetProc(pid) if BackendPidGetProc(pid) returns NULL, like
we do in pg_stat_get_activity().
In version 17 and above, it's a little silly to use those functions
when we already have the ProcNumber at hand, but it was necessary
before v17 because the backend ID was different from ProcNumber. I
have other plans for wait_event_info on master, so it doesn't seem
worth applying a different fix on different versions now.
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://www.postgresql.org/message-id/c0320e04-6e85-4c49-80c5-27cfb3a58108@iki.fi
Backpatch-through: 14 M src/backend/utils/adt/pgstatfuncs.c
Further stabilize a postgres_fdw test case.
commit : ec9f0cbe018a8c99aefcc19b688e8929fad4433c
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 11 Feb 2026 11:03:01 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Wed, 11 Feb 2026 11:03:01 -0500 The buildfarm occasionally shows a variant row order in the output
of this UPDATE ... RETURNING, implying that the preceding INSERT
dropped one of the rows into some free space within the table rather
than appending them all at the end. It's not entirely clear why that
happens some times and not other times, but we have established that
it's affected by concurrent activity in other databases of the
cluster. In any case, the behavior is not wrong; the test is at fault
for presuming that a seqscan will give deterministic row ordering.
Add an ORDER BY atop the update to stop the buildfarm noise.
The buildfarm seems to have shown this only in v18 and master
branches, but just in case the cause is older, back-patch to
all supported branches.
Discussion: https://postgr.es/m/3866274.1770743162@sss.pgh.pa.us
Backpatch-through: 14 M contrib/postgres_fdw/expected/postgres_fdw.out
M contrib/postgres_fdw/sql/postgres_fdw.sql
doc: Mention all SELECT privileges required by INSERT ... ON CONFLICT.
commit : 3586c5e7899732ad16f9d3bada11de940db5ecd7
author : Dean Rasheed <dean.a.rasheed@gmail.com>
date : Wed, 11 Feb 2026 10:53:03 +0000
committer: Dean Rasheed <dean.a.rasheed@gmail.com>
date : Wed, 11 Feb 2026 10:53:03 +0000 On the INSERT page, mention that SELECT privileges are also required
for any columns mentioned in the arbiter clause, including those
referred to by the constraint, and clarify that this applies to all
forms of ON CONFLICT, not just ON CONFLICT DO UPDATE.
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Reviewed-by: Viktor Holmberg <v@viktorh.net>
Discussion: https://postgr.es/m/CAEZATCXGwMQ+x00YY9XYG46T0kCajH=21QaYL9Xatz0dLKii+g@mail.gmail.com
Backpatch-through: 14 M doc/src/sgml/ref/insert.sgml
doc: Clarify RLS policies applied for ON CONFLICT DO NOTHING.
commit : 301449686df7e84699b6cab0afb8ab3119ddcd1f
author : Dean Rasheed <dean.a.rasheed@gmail.com>
date : Wed, 11 Feb 2026 10:25:10 +0000
committer: Dean Rasheed <dean.a.rasheed@gmail.com>
date : Wed, 11 Feb 2026 10:25:10 +0000 On the CREATE POLICY page, the description of per-command policies
stated that SELECT policies are applied when an INSERT has an ON
CONFLICT DO NOTHING clause. However, that is only the case if it
includes an arbiter clause, so clarify that.
While at it, also clarify the comment in the regression tests that
cover this.
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Reviewed-by: Viktor Holmberg <v@viktorh.net>
Discussion: https://postgr.es/m/CAEZATCXGwMQ+x00YY9XYG46T0kCajH=21QaYL9Xatz0dLKii+g@mail.gmail.com
Backpatch-through: 14 M doc/src/sgml/ref/create_policy.sgml