Re: pgsql: Rename argument in pg_get_process_memory_contexts().

2025-04-08 Thread Michael Paquier
On Wed, Apr 09, 2025 at 12:49:52PM +1200, David Rowley wrote: > On Wed, 9 Apr 2025 at 09:22, Daniel Gustafsson > wrote: > > Rename argument in pg_get_process_memory_contexts(). > > > src/include/catalog/pg_proc.dat | 2 +- > > I think this should have done a catversion bump. Yes, the catversion

pgsql: Doc: note that two examples in optimizer/README are oversimplifi

2025-04-08 Thread Tom Lane
Doc: note that two examples in optimizer/README are oversimplified. These examples fail to account for join clauses generated by EquivalenceClasses, but since we haven't mentioned EquivalenceClasses yet it seems like it'd just add confusion to make them fully accurate. Instead, parenthetically not

Re: pgsql: Rename argument in pg_get_process_memory_contexts().

2025-04-08 Thread David Rowley
On Wed, 9 Apr 2025 at 09:22, Daniel Gustafsson wrote: > Rename argument in pg_get_process_memory_contexts(). > src/include/catalog/pg_proc.dat | 2 +- I think this should have done a catversion bump. I suspect we'll get one soon enough, but you never know... David

pgsql: Adjust AdjustUpgrade.pm for commit b1720fe63.

2025-04-08 Thread Tom Lane
Adjust AdjustUpgrade.pm for commit b1720fe63. Need to delete the functions we no longer have available from the dumps to be reloaded from old versions. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b65b9da568fd93f8fe3b41f4074f225eead104d2 Modified

pgsql: Rename argument in pg_get_process_memory_contexts().

2025-04-08 Thread Daniel Gustafsson
Rename argument in pg_get_process_memory_contexts(). During development the third argument to pg_get_process_memory_contexts was a retry count, but it was changed to a timeout instead. The param name was accidentally left in pg_proc.dat though. Fix by renaming to the correct parameter name. Aut

pgsql: Move contrib/spi testing from core regression tests to contrib/s

2025-04-08 Thread Tom Lane
Move contrib/spi testing from core regression tests to contrib/spi. It's weird to have the core regression tests depending on contrib code, and coverage testing shows that those test queries add nothing to the core-code coverage of the core tests. So pull those test bits out and put them into ord

pgsql: Fix uninitialized index information access during apply.

2025-04-08 Thread Amit Kapila
Fix uninitialized index information access during apply. The issue happens when building conflict information during apply of INSERT or UPDATE operations that violate unique constraints on leaf partitions. The problem was introduced in commit 9ff68679b5, which removed the redundant calls to ExecO

Re: pgsql: Add support for basic NUMA awareness

2025-04-08 Thread Tom Lane
Andres Freund writes: > On April 8, 2025 10:05:48 AM EDT, Tom Lane wrote: >> I noticed this a little further up in dogfish's log: >> >> ninja: bad depfile: expected ':', saw 's' > I noticed that too - but it happened even before the hard failures. Will look > at it in a bit. After catching up

Re: pgsql: Add support for basic NUMA awareness

2025-04-08 Thread Wolfgang Walther
Andres Freund: But it'd be nice to add a note to the buildfarm animal indicating it's using samurai instead of ninja (setnotes.pl). Did that! Best, Wolfgang

pgsql: Fix incorrect format placeholder

2025-04-08 Thread Peter Eisentraut
Fix incorrect format placeholder for commit 749a9e20c97 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8969194b73dbc9642a0302225f686f9febd95c90 Modified Files -- contrib/pgcrypto/crypt-gensalt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: pgsql: Make cancel request keys longer

2025-04-08 Thread Peter Eisentraut
On 02.04.25 15:43, Heikki Linnakangas wrote: Make cancel request keys longer This patch changed the signature of ProcSignal() -ProcSignalInit(bool cancel_key_valid, int32 cancel_key) +ProcSignalInit(char *cancel_key, int cancel_key_len) but did not update the caller in auxprocess.c: ProcSign

Re: pgsql: Transfer statistics during pg_upgrade.

2025-04-08 Thread Jeff Davis
On Tue, 2025-04-08 at 17:24 +1200, David Rowley wrote: > I was surprised to see when I did pg_dump -T just_this_table that I > also got statistics data for all tables in the database. -T means "exclude this pattern" I tried a few basic variations and they seemed to do what I expected: CREATE

pgsql: Prevent 006_transfer_modes.pl from leaving files behind.

2025-04-08 Thread Nathan Bossart
Prevent 006_transfer_modes.pl from leaving files behind. This test was leaving files like delete_old_cluster.{sh,bat} in the source directory for VPATH and meson builds. To fix, change the directory to tmp_check before running the test, as was done in commits 15b6d21553, 8af917be6b, and c462b054b

Re: pgsql: Add support for basic NUMA awareness

2025-04-08 Thread Wolfgang Walther
Andres Freund: But I'm rather bewildered - I can't actually build with the professed version of ninja, it errors out: ninja-1.9.0 src/bin/psql/sql_help.c ninja: error: build.ninja:8462: multiple outputs aren't (yet?) supported by depslog; bring this up on the mailing list if it affects you So

Re: pgsql: Add support for basic NUMA awareness

2025-04-08 Thread Andres Freund
Hi, On 2025-04-08 17:17:21 +0200, Wolfgang Walther wrote: > Andres Freund: > > But I'm rather bewildered - I can't actually build with the professed > > version > > of ninja, it errors out: > > > > ninja-1.9.0 src/bin/psql/sql_help.c > > ninja: error: build.ninja:8462: multiple outputs aren't (y

Re: pgsql: Add support for basic NUMA awareness

2025-04-08 Thread Andres Freund
Hi, On April 8, 2025 10:05:48 AM EDT, Tom Lane wrote: >Daniel Gustafsson writes: >>> On 7 Apr 2025, at 23:18, Tomas Vondra wrote: >>> Add support for basic NUMA awareness > >> dogfish is a little bit upset it seems. > >Hm, but why isn't anything else? I assume it's a question of degree of para

Re: pgsql: Add support for basic NUMA awareness

2025-04-08 Thread Tom Lane
Daniel Gustafsson writes: >> On 7 Apr 2025, at 23:18, Tomas Vondra wrote: >> Add support for basic NUMA awareness > dogfish is a little bit upset it seems. Hm, but why isn't anything else? I noticed this a little further up in dogfish's log: ninja: bad depfile: expected ':', saw 's' I wonder

pgsql: ci: Add MBUILD_TARGET for NetBSD and OpenBSD

2025-04-08 Thread Daniel Gustafsson
ci: Add MBUILD_TARGET for NetBSD and OpenBSD Commit b2bdb972c0 added MBUILD_TARGET to ensure that meson builds the tests before running them, this adds MBUILD_TARGET to OpenBSD and NetBSD builds as well where it was missing. No backpatching since OpenBSD and NetBSD support does not exist in the b

Re: pgsql: Fix PG 17 [NOT] NULL optimization bug for domains

2025-04-08 Thread Bruce Momjian
On Tue, Apr 8, 2025 at 01:34:07AM +, Bruce Momjian wrote: > Fix PG 17 [NOT] NULL optimization bug for domains > > A PG 17 optimization allowed columns with NOT NULL constraints to skip > table scans for IS NULL queries, and to skip IS NOT NULL checks for IS > NOT NULL queries. This didn't wo

Re: pgsql: Add support for basic NUMA awareness

2025-04-08 Thread Daniel Gustafsson
> On 7 Apr 2025, at 23:18, Tomas Vondra wrote: > > Add support for basic NUMA awareness dogfish is a little bit upset it seems. ninja: job failed: ccache gcc -Isrc/port/libpgport.a.p -Isrc/include -I../pgsql/src/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2

pgsql: doc: Correct pg_shmem_allocations_numa.size data type

2025-04-08 Thread Tomas Vondra
doc: Correct pg_shmem_allocations_numa.size data type The code in pg_get_shmem_allocations_numa() returned 'size' as int64, but the docs said int32. Report and fix by Noriyoshi Shinoda. Reported-by: Noriyoshi Shinoda Discussion: https://postgr.es/m/dm4pr84mb1734308eb741a6ecff040c27ee...@dm4pr8

pgsql: Add function to get memory context stats for processes

2025-04-08 Thread Daniel Gustafsson
Add function to get memory context stats for processes This adds a function for retrieving memory context statistics and information from backends as well as auxiliary processes. The intended usecase is cluster debugging when under memory pressure or unanticipated memory usage characteristics. Wh