pgsql: Update Unicode data to CLDR 45

2024-04-22 Thread Peter Eisentraut
Update Unicode data to CLDR 45

No actual changes result.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/9e2e4f08bb6cc86710cb84459b7fd0f407e596a7

Modified Files
--
src/Makefile.global.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Update src/common/unicode/.gitignore

2024-04-22 Thread Peter Eisentraut
Update src/common/unicode/.gitignore

for new downloaded files and new build results.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/7e44ac3741dd2ebf8c668d6ac6a10fa6ed7301b3

Modified Files
--
src/common/unicode/.gitignore | 4 
1 file changed, 4 insertions(+)



pgsql: Fix dumps of partitioned tables with table AMs

2024-04-22 Thread Michael Paquier
Fix dumps of partitioned tables with table AMs

pg_dump/restore failed to properly set the table access method for
partitioned tables, as it relies on SET queries that would change
default_table_access_method.  However, SET affects only tables and
materialized views, not partitioned tables which would always be
restored with their pg_class.relam set to 0, losing their table AM set
by either a CREATE TABLE .. USING or by a ALTER TABLE .. SET ACCESS
METHOD.

Appending a USING clause to the definition of CREATE TABLE is not
possible as users may specify --no-table-access-method at restore or for
a dump, meaning that the table AM portions may have to be skipped.
Rather than SET, the solution used by this commit is to generate an
extra ALTER TABLE .. SET ACCESS METHOD when restoring a partitioned
table, based on the table AM set in its TOC entry.  The choice of using
a SET query or an ALTER TABLE query for a relation requires the addition
of the relkind to the TOC entry to be able to choose between one or the
other.  Note that using ALTER TABLE SET ACCESS METHOD on a relation with
physical storage would require a full rewrite, which would be costly for
one.  This also creates problems with binary upgrades where the rewrite
would not be able to keep the OID of the relation consistent across the
upgrade.

This commit would normally require a protocol bump, but a45c78e3284b has
already done one for this release cycle.

Regression tests are adjusted with the new expected output, with some
tweaks for the table AMs of the partitions to make the output more
readable.

Issue introduced by 374c7a229042, that has added support for table AMs
in partitioned tables.

Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/zh4jlsvvtqgbj...@paquier.xyz

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/f46bee346c3b6aab0a0f3f39dc734732b79ce1ed

Modified Files
--
src/bin/pg_dump/pg_backup_archiver.c | 70 ++--
src/bin/pg_dump/pg_backup_archiver.h |  5 ++-
src/bin/pg_dump/pg_dump.c|  1 +
src/bin/pg_dump/t/002_pg_dump.pl | 12 +++
4 files changed, 79 insertions(+), 9 deletions(-)



pgsql: Remove unneeded nbtree array preprocessing assert.

2024-04-22 Thread Peter Geoghegan
Remove unneeded nbtree array preprocessing assert.

Certain cases involving the use of cursors had assertion failures within
_bt_preprocess_keys's recently added no-op return path.  The assertion
in question made the faulty assumption that a second or third call to
_bt_preprocess_keys (within the same btrescan) could only happen when
another scheduled primitive index scan was just about to begin.

It would be possible to address the problem by only allowing scans that
have array keys to take the new no-op path, forcing affected cases to
perform redundant preprocessing work.  It seems simpler to just remove
the assertion, and reframe the no-op path as a more general mechanism.
Take this simpler approach.

The important underlying principle is that we only need to perform
preprocessing once per btrescan (at most).  This is expected regardless
of whether or not the scan happens to have array keys.

Oversight in commit 1b134ca5, which enhanced nbtree ScalarArrayOp
execution.

Reported-By: Alexander Lakhin 
Discussion: https://postgr.es/m/ef0f7c8b-a6fa-362e-6fd6-054950f94...@gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/480bc6e3ed3a5719cdec076d4943b119890e8171

Modified Files
--
src/backend/access/nbtree/nbtutils.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)