pgsql: pg_dump: Fix incorrect archive format shown in error message.

2025-04-16 Thread Fujii Masao
pg_dump: Fix incorrect archive format shown in error message. In pg_dump and pg_restore, _allocAH() calls _discoverArchiveFormat() to determine the archive format when the input format is unknown one. If the input or discovered format is unrecognized, it reports an error including the archive form

pgsql: Improve comment in regc_pg_locale.c.

2025-04-16 Thread Jeff Davis
Improve comment in regc_pg_locale.c. Reported-by: Noah Misch Reviewed-by: Noah Misch Discussion: https://postgr.es/m/20250412123430.8c.nmi...@google.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b107744ce73782a996aaa65dfd9d1bb3c543503d Modified Files --

pgsql: Another unintentional behavior change in commit e9931bfb75.

2025-04-16 Thread Jeff Davis
Another unintentional behavior change in commit e9931bfb75. Reported-by: Noah Misch Reviewed-by: Noah Misch Discussion: https://postgr.es/m/20250412123430.8c.nmi...@google.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2e5353be2534aed99a714f99c8a193f85777e64a

pgsql: Fixup various new-to-v18 usages of appendPQExpBuffer

2025-04-16 Thread David Rowley
Fixup various new-to-v18 usages of appendPQExpBuffer Use appendPQExpBufferStr when there are no parameters and appendPQExpBufferChar when the string length is 1. Author: David Rowley Discussion: https://postgr.es/m/caaphdvoarmvpexttc0hnparbhn-wgvstc8xfcymgozvgu_1...@mail.gmail.com Branch -

pgsql: Sync declarations and definitions of two new tablecmds.c functio

2025-04-16 Thread Tom Lane
Sync declarations and definitions of two new tablecmds.c functions. Buildfarm member drongo complained because the definitions of these functions used "const Oid foo" where the forward declarations just had "Oid foo". (I'm a bit surprised that drongo seems to be the only complainant.) I chose to

pgsql: Elide not-null constraint checks on child tables during PK creat

2025-04-16 Thread Álvaro Herrera
Elide not-null constraint checks on child tables during PK creation We were unnecessarily acquiring AccessExclusiveLock on all child tables when "ALTER TABLE ONLY sometab ADD PRIMARY KEY" was run on their parent table, an oversight in commit 14e87ffa5c54. This caused deadlocks during pg_restore o

Re: pgsql: Add support for basic NUMA awareness

2025-04-16 Thread Jacob Champion
On Wed, Apr 16, 2025 at 9:30 AM Daniel Gustafsson wrote: > It seems like this commit didn't run autoheader, which leaves a trivial diff > in > pg_config.h.in carried over for future callers. It doesn't change anuything > really as the HAVE_LIBNUMA macro isn't used, but for completeness sake we >

Re: pgsql: Add support for basic NUMA awareness

2025-04-16 Thread Daniel Gustafsson
> On 16 Apr 2025, at 20:15, Tomas Vondra wrote: > > On 4/16/25 18:34, Jacob Champion wrote: >> On Wed, Apr 16, 2025 at 9:30 AM Daniel Gustafsson wrote: >>> It seems like this commit didn't run autoheader, which leaves a trivial >>> diff in >>> pg_config.h.in carried over for future callers. It

Re: pgsql: Add support for basic NUMA awareness

2025-04-16 Thread Tomas Vondra
On 4/16/25 18:34, Jacob Champion wrote: > On Wed, Apr 16, 2025 at 9:30 AM Daniel Gustafsson wrote: >> It seems like this commit didn't run autoheader, which leaves a trivial diff >> in >> pg_config.h.in carried over for future callers. It doesn't change anuything >> really as the HAVE_LIBNUMA ma

pgsql: Fix pg_dump --clean with partitioned indexes.

2025-04-16 Thread Tom Lane
Fix pg_dump --clean with partitioned indexes. We'd try to drop the partitions of a partitioned index separately, which is disallowed by the backend, leading to an error during restore. While the error is harmless, it causes problems if you try to use --single-transaction mode. Fortunately, there

pgsql: Fix pg_dump --clean with partitioned indexes.

2025-04-16 Thread Tom Lane
Fix pg_dump --clean with partitioned indexes. We'd try to drop the partitions of a partitioned index separately, which is disallowed by the backend, leading to an error during restore. While the error is harmless, it causes problems if you try to use --single-transaction mode. Fortunately, there

pgsql: Fix pg_dump --clean with partitioned indexes.

2025-04-16 Thread Tom Lane
Fix pg_dump --clean with partitioned indexes. We'd try to drop the partitions of a partitioned index separately, which is disallowed by the backend, leading to an error during restore. While the error is harmless, it causes problems if you try to use --single-transaction mode. Fortunately, there

pgsql: Fix pg_dump --clean with partitioned indexes.

2025-04-16 Thread Tom Lane
Fix pg_dump --clean with partitioned indexes. We'd try to drop the partitions of a partitioned index separately, which is disallowed by the backend, leading to an error during restore. While the error is harmless, it causes problems if you try to use --single-transaction mode. Fortunately, there

pgsql: Fix pg_dump --clean with partitioned indexes.

2025-04-16 Thread Tom Lane
Fix pg_dump --clean with partitioned indexes. We'd try to drop the partitions of a partitioned index separately, which is disallowed by the backend, leading to an error during restore. While the error is harmless, it causes problems if you try to use --single-transaction mode. Fortunately, there

pgsql: Fix pg_dump --clean with partitioned indexes.

2025-04-16 Thread Tom Lane
Fix pg_dump --clean with partitioned indexes. We'd try to drop the partitions of a partitioned index separately, which is disallowed by the backend, leading to an error during restore. While the error is harmless, it causes problems if you try to use --single-transaction mode. Fortunately, there

pgsql: pg_restore cleanups

2025-04-16 Thread Andrew Dunstan
pg_restore cleanups . remove unnecessary oid_string list stuff . use pg_get_line_buf() instead of open-coding it . cleaner parsing of map.dat lines Reverts 2b69afbe50d add new list type simple_oid_string_list to fe-utils/simple_list Author: Álvaro Herrera Author: Andrew Dunstan Discussion: h