pgsql: Rework output format of pg_dependencies

2025-11-16 Thread Michael Paquier
Rework output format of pg_dependencies The existing format of pg_dependencies uses a single-object JSON structure, with each key value embedding all the knowledge about the set attributes tracked, like: {"1 => 5": 1.00, "5 => 1": 0.423130} While this is a very compact format, it is confusing

pgsql: Rework output format of pg_ndistinct

2025-11-16 Thread Michael Paquier
Rework output format of pg_ndistinct The existing format of pg_ndistinct uses a single-object JSON structure where each key is itself a comma-separated list of attnums, like: {"3, 4": 11, "3, 6": 11, "4, 6": 11, "3, 4, 6": 11} While this is a very compact format, it is confusing to read and it is

pgsql: Define PS_USE_CLOBBER_ARGV on GNU/Hurd.

2025-11-16 Thread Thomas Munro
Define PS_USE_CLOBBER_ARGV on GNU/Hurd. Until d2ea2d310dfdc40328aca5b6c52225de78432e01, the PS_USE_PS_STRINGS option was used on the GNU/Hurd. As this option got removed and PS_USE_CLOBBER_ARGV appears to work fine nowadays on the Hurd, define this one to re-enable process title changes on this pl

pgsql: Define PS_USE_CLOBBER_ARGV on GNU/Hurd.

2025-11-16 Thread Thomas Munro
Define PS_USE_CLOBBER_ARGV on GNU/Hurd. Until d2ea2d310dfdc40328aca5b6c52225de78432e01, the PS_USE_PS_STRINGS option was used on the GNU/Hurd. As this option got removed and PS_USE_CLOBBER_ARGV appears to work fine nowadays on the Hurd, define this one to re-enable process title changes on this pl

pgsql: Define PS_USE_CLOBBER_ARGV on GNU/Hurd.

2025-11-16 Thread Thomas Munro
Define PS_USE_CLOBBER_ARGV on GNU/Hurd. Until d2ea2d310dfdc40328aca5b6c52225de78432e01, the PS_USE_PS_STRINGS option was used on the GNU/Hurd. As this option got removed and PS_USE_CLOBBER_ARGV appears to work fine nowadays on the Hurd, define this one to re-enable process title changes on this pl

pgsql: Define PS_USE_CLOBBER_ARGV on GNU/Hurd.

2025-11-16 Thread Thomas Munro
Define PS_USE_CLOBBER_ARGV on GNU/Hurd. Until d2ea2d310dfdc40328aca5b6c52225de78432e01, the PS_USE_PS_STRINGS option was used on the GNU/Hurd. As this option got removed and PS_USE_CLOBBER_ARGV appears to work fine nowadays on the Hurd, define this one to re-enable process title changes on this pl

pgsql: Get rid of long datatype in CATCACHE_STATS enabled builds

2025-11-16 Thread David Rowley
Get rid of long datatype in CATCACHE_STATS enabled builds "long" is 32 bits on Windows 64-bit. Switch to a datatype that's 64-bit on all platforms. While we're there, use an unsigned type as these fields count things that have occurred, of which it's not possible to have negative numbers of. Au

pgsql: Adjust MemSet macro to use size_t rather than long

2025-11-16 Thread David Rowley
Adjust MemSet macro to use size_t rather than long Likewise for MemSetAligned. "long" wasn't the most suitable type for these macros as with MSVC in 64-bit builds, sizeof(long) == 4, which is narrower than the processor's word size, therefore these macros had to perform twice as many loops as the

pgsql: Add test for temporary file removal and WITH HOLD cursor

2025-11-16 Thread Michael Paquier
Add test for temporary file removal and WITH HOLD cursor This new test, added in 009_log_temp_files, checks that the temporary files created by a WITH HOLD cursor are dropped at the end of the transaction where the transaction has been created. The portal's executor is shutdown in PersistHoldable

pgsql: Fix Assert failure in EXPLAIN ANALYZE MERGE with a concurrent up

2025-11-16 Thread Dean Rasheed
Fix Assert failure in EXPLAIN ANALYZE MERGE with a concurrent update. When instrumenting a MERGE command containing both WHEN NOT MATCHED BY SOURCE and WHEN NOT MATCHED BY TARGET actions using EXPLAIN ANALYZE, a concurrent update of the target relation could lead to an Assert failure in show_modif

pgsql: Fix Assert failure in EXPLAIN ANALYZE MERGE with a concurrent up

2025-11-16 Thread Dean Rasheed
Fix Assert failure in EXPLAIN ANALYZE MERGE with a concurrent update. When instrumenting a MERGE command containing both WHEN NOT MATCHED BY SOURCE and WHEN NOT MATCHED BY TARGET actions using EXPLAIN ANALYZE, a concurrent update of the target relation could lead to an Assert failure in show_modif

pgsql: Fix Assert failure in EXPLAIN ANALYZE MERGE with a concurrent up

2025-11-16 Thread Dean Rasheed
Fix Assert failure in EXPLAIN ANALYZE MERGE with a concurrent update. When instrumenting a MERGE command containing both WHEN NOT MATCHED BY SOURCE and WHEN NOT MATCHED BY TARGET actions using EXPLAIN ANALYZE, a concurrent update of the target relation could lead to an Assert failure in show_modif

pgsql: Doc: include MERGE in variable substitution command list

2025-11-16 Thread David Rowley
Doc: include MERGE in variable substitution command list Backpatch to 15, where MERGE was introduced. Reported-by: Author: David Rowley Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 Branch -- REL_15_STABLE Details

pgsql: Doc: include MERGE in variable substitution command list

2025-11-16 Thread David Rowley
Doc: include MERGE in variable substitution command list Backpatch to 15, where MERGE was introduced. Reported-by: Author: David Rowley Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 Branch -- REL_16_STABLE Details

pgsql: Doc: include MERGE in variable substitution command list

2025-11-16 Thread David Rowley
Doc: include MERGE in variable substitution command list Backpatch to 15, where MERGE was introduced. Reported-by: Author: David Rowley Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 Branch -- REL_17_STABLE Details

pgsql: Doc: include MERGE in variable substitution command list

2025-11-16 Thread David Rowley
Doc: include MERGE in variable substitution command list Backpatch to 15, where MERGE was introduced. Reported-by: Author: David Rowley Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 Branch -- REL_18_STABLE Details

pgsql: Doc: include MERGE in variable substitution command list

2025-11-16 Thread David Rowley
Doc: include MERGE in variable substitution command list Backpatch to 15, where MERGE was introduced. Reported-by: Author: David Rowley Discussion: https://postgr.es/m/[email protected] Backpatch-through: 15 Branch -- master Details --- htt