pgsql: Add comments explaining overflow entries in the replication lag

2025-10-22 Thread Fujii Masao
Add comments explaining overflow entries in the replication lag tracker. Commit 883a95646a8 introduced overflow entries in the replication lag tracker to fix an issue where lag columns in pg_stat_replication could stall when the replay LSN stopped advancing. This commit adds comments clarifying t

pgsql: Add comments explaining overflow entries in the replication lag

2025-10-22 Thread Fujii Masao
Add comments explaining overflow entries in the replication lag tracker. Commit 883a95646a8 introduced overflow entries in the replication lag tracker to fix an issue where lag columns in pg_stat_replication could stall when the replay LSN stopped advancing. This commit adds comments clarifying t

pgsql: Add comments explaining overflow entries in the replication lag

2025-10-22 Thread Fujii Masao
Add comments explaining overflow entries in the replication lag tracker. Commit 883a95646a8 introduced overflow entries in the replication lag tracker to fix an issue where lag columns in pg_stat_replication could stall when the replay LSN stopped advancing. This commit adds comments clarifying t

pgsql: Add comments explaining overflow entries in the replication lag

2025-10-22 Thread Fujii Masao
Add comments explaining overflow entries in the replication lag tracker. Commit 883a95646a8 introduced overflow entries in the replication lag tracker to fix an issue where lag columns in pg_stat_replication could stall when the replay LSN stopped advancing. This commit adds comments clarifying t

pgsql: Add comments explaining overflow entries in the replication lag

2025-10-22 Thread Fujii Masao
Add comments explaining overflow entries in the replication lag tracker. Commit 883a95646a8 introduced overflow entries in the replication lag tracker to fix an issue where lag columns in pg_stat_replication could stall when the replay LSN stopped advancing. This commit adds comments clarifying t

pgsql: Add comments explaining overflow entries in the replication lag

2025-10-22 Thread Fujii Masao
Add comments explaining overflow entries in the replication lag tracker. Commit 883a95646a8 introduced overflow entries in the replication lag tracker to fix an issue where lag columns in pg_stat_replication could stall when the replay LSN stopped advancing. This commit adds comments clarifying t

pgsql: Add comments explaining overflow entries in the replication lag

2025-10-22 Thread Fujii Masao
Add comments explaining overflow entries in the replication lag tracker. Commit 883a95646a8 introduced overflow entries in the replication lag tracker to fix an issue where lag columns in pg_stat_replication could stall when the replay LSN stopped advancing. This commit adds comments clarifying t

pgsql: Fix coding style with "else".

2025-10-22 Thread Tatsuo Ishii
Fix coding style with "else". The "else" code block having single statement with comments on a separate line should have been surrounded by braces. Reported-by: Chao Li Suggested-by: David Rowley Author: Tatsuo Ishii Discussion: https://postgr.es/m/20251020.125847.997839131426057290.ishii%40p

pgsql: Fix some misplaced comments in parallel_schedule

2025-10-22 Thread David Rowley
Fix some misplaced comments in parallel_schedule These are listing which other tests one of the tests in the subsequent group depends on. A couple of comments were located with unrelated tests. In passing, fix a small grammatical issue. Noticed in passing while working on something else. Autho

pgsql: Add copyright notice to vacuum_horizon_floor.pl test.

2025-10-22 Thread Masahiko Sawada
Add copyright notice to vacuum_horizon_floor.pl test. Fix oversight in commit 303ba0573, which was backpatched through 14. Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAD21AoBeFdTJcwUfUYPcEgONab3TS6i1PB9S5cSXcBAmdAdQKw%40mail.gmail.com Backpatch-through: 14 Branch -- maste

pgsql: Add copyright notice to vacuum_horizon_floor.pl test.

2025-10-22 Thread Masahiko Sawada
Add copyright notice to vacuum_horizon_floor.pl test. Fix oversight in commit 303ba0573, which was backpatched through 14. Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAD21AoBeFdTJcwUfUYPcEgONab3TS6i1PB9S5cSXcBAmdAdQKw%40mail.gmail.com Backpatch-through: 14 Branch -- REL_1

pgsql: Add copyright notice to vacuum_horizon_floor.pl test.

2025-10-22 Thread Masahiko Sawada
Add copyright notice to vacuum_horizon_floor.pl test. Fix oversight in commit 303ba0573, which was backpatched through 14. Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAD21AoBeFdTJcwUfUYPcEgONab3TS6i1PB9S5cSXcBAmdAdQKw%40mail.gmail.com Backpatch-through: 14 Branch -- REL_1

pgsql: Add copyright notice to vacuum_horizon_floor.pl test.

2025-10-22 Thread Masahiko Sawada
Add copyright notice to vacuum_horizon_floor.pl test. Fix oversight in commit 303ba0573, which was backpatched through 14. Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAD21AoBeFdTJcwUfUYPcEgONab3TS6i1PB9S5cSXcBAmdAdQKw%40mail.gmail.com Backpatch-through: 14 Branch -- REL_1

pgsql: Add copyright notice to vacuum_horizon_floor.pl test.

2025-10-22 Thread Masahiko Sawada
Add copyright notice to vacuum_horizon_floor.pl test. Fix oversight in commit 303ba0573, which was backpatched through 14. Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAD21AoBeFdTJcwUfUYPcEgONab3TS6i1PB9S5cSXcBAmdAdQKw%40mail.gmail.com Backpatch-through: 14 Branch -- REL_1

pgsql: Add copyright notice to vacuum_horizon_floor.pl test.

2025-10-22 Thread Masahiko Sawada
Add copyright notice to vacuum_horizon_floor.pl test. Fix oversight in commit 303ba0573, which was backpatched through 14. Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAD21AoBeFdTJcwUfUYPcEgONab3TS6i1PB9S5cSXcBAmdAdQKw%40mail.gmail.com Backpatch-through: 14 Branch -- REL_1

pgsql: Fix incorrect zero extension of Datum in JIT tuple deform code

2025-10-22 Thread David Rowley
Fix incorrect zero extension of Datum in JIT tuple deform code When JIT deformed tuples (controlled via the jit_tuple_deforming GUC), types narrower than sizeof(Datum) would be zero-extended up to Datum width. This wasn't the same as what fetch_att() does in the standard tuple deforming code. Lo

pgsql: Fix incorrect zero extension of Datum in JIT tuple deform code

2025-10-22 Thread David Rowley
Fix incorrect zero extension of Datum in JIT tuple deform code When JIT deformed tuples (controlled via the jit_tuple_deforming GUC), types narrower than sizeof(Datum) would be zero-extended up to Datum width. This wasn't the same as what fetch_att() does in the standard tuple deforming code. Lo

pgsql: Fix incorrect zero extension of Datum in JIT tuple deform code

2025-10-22 Thread David Rowley
Fix incorrect zero extension of Datum in JIT tuple deform code When JIT deformed tuples (controlled via the jit_tuple_deforming GUC), types narrower than sizeof(Datum) would be zero-extended up to Datum width. This wasn't the same as what fetch_att() does in the standard tuple deforming code. Lo

pgsql: Fix incorrect zero extension of Datum in JIT tuple deform code

2025-10-22 Thread David Rowley
Fix incorrect zero extension of Datum in JIT tuple deform code When JIT deformed tuples (controlled via the jit_tuple_deforming GUC), types narrower than sizeof(Datum) would be zero-extended up to Datum width. This wasn't the same as what fetch_att() does in the standard tuple deforming code. Lo

pgsql: Fix incorrect zero extension of Datum in JIT tuple deform code

2025-10-22 Thread David Rowley
Fix incorrect zero extension of Datum in JIT tuple deform code When JIT deformed tuples (controlled via the jit_tuple_deforming GUC), types narrower than sizeof(Datum) would be zero-extended up to Datum width. This wasn't the same as what fetch_att() does in the standard tuple deforming code. Lo

pgsql: Fix incorrect zero extension of Datum in JIT tuple deform code

2025-10-22 Thread David Rowley
Fix incorrect zero extension of Datum in JIT tuple deform code When JIT deformed tuples (controlled via the jit_tuple_deforming GUC), types narrower than sizeof(Datum) would be zero-extended up to Datum width. This wasn't the same as what fetch_att() does in the standard tuple deforming code. Lo

pgsql: Fix incorrect zero extension of Datum in JIT tuple deform code

2025-10-22 Thread David Rowley
Fix incorrect zero extension of Datum in JIT tuple deform code When JIT deformed tuples (controlled via the jit_tuple_deforming GUC), types narrower than sizeof(Datum) would be zero-extended up to Datum width. This wasn't the same as what fetch_att() does in the standard tuple deforming code. Lo

pgsql: Avoid assuming that time_t can fit in an int.

2025-10-22 Thread Tom Lane
Avoid assuming that time_t can fit in an int. We had several places that used cast-to-unsigned-int as a substitute for properly checking for overflow. Coverity has started objecting to that practice as likely introducing Y2038 bugs. An extra comparison is surely not much compared to the cost of

pgsql: Fix type of infomask parameter in htup_details.h functions.

2025-10-22 Thread Nathan Bossart
Fix type of infomask parameter in htup_details.h functions. Oversight in commit 34694ec888. Since there aren't any known live bugs related to this, no back-patch. Reviewed-by: Tom Lane Discussion: https://postgr.es/m/aPk4u955ZPPZ_nYw%40nathan Branch -- master Details --- https://git.p

pgsql: Remove useless pstrdup() calls.

2025-10-22 Thread Tom Lane
Remove useless pstrdup() calls. The result of PLyUnicode_AsString is already palloc'd, so pstrdup'ing it is just a waste of time and memory. More importantly it might confuse people about whether that's necessary. Doesn't seem important enough to back-patch, but we should fix it. Spotted by Cove

pgsql: Fix memory leaks in scripts/vacuuming.c.

2025-10-22 Thread Tom Lane
Fix memory leaks in scripts/vacuuming.c. Coverity complained that the list of table names returned by retrieve_objects() was leaked, and it's right. Potentially this is quite a lot of memory; however, it's not entirely clear how much we gain by cleaning it up, since in many operating modes we're

pgsql: Fix memory leaks in pg_combinebackup/reconstruct.c.

2025-10-22 Thread Tom Lane
Fix memory leaks in pg_combinebackup/reconstruct.c. One code path forgot to free the separately-malloc'd filename part of a struct rfile. Another place freed the filename but forgot the struct rfile itself. These seem worth fixing because with a large backup we could be dealing with many files.

pgsql: Fix memory leaks in pg_combinebackup/reconstruct.c.

2025-10-22 Thread Tom Lane
Fix memory leaks in pg_combinebackup/reconstruct.c. One code path forgot to free the separately-malloc'd filename part of a struct rfile. Another place freed the filename but forgot the struct rfile itself. These seem worth fixing because with a large backup we could be dealing with many files.

pgsql: Fix memory leaks in pg_combinebackup/reconstruct.c.

2025-10-22 Thread Tom Lane
Fix memory leaks in pg_combinebackup/reconstruct.c. One code path forgot to free the separately-malloc'd filename part of a struct rfile. Another place freed the filename but forgot the struct rfile itself. These seem worth fixing because with a large backup we could be dealing with many files.

pgsql: Remove make_temptable_name_n().

2025-10-22 Thread Nathan Bossart
Remove make_temptable_name_n(). This small function is only used in one place, and it fails to handle quoted table names (although the table name portion of the input should never be quoted in current usage). In addition to removing make_temptable_name_n() in favor of open-coding it where needed,

pgsql: Add commit 24f6c1bd4 to v17 .abi-compliance-history.

2025-10-22 Thread Tom Lane
Add commit 24f6c1bd4 to v17 .abi-compliance-history. Per buildfarm. The breakage was discussed and deemed acceptable in the patch thread, but it was not mentioned in the commit log, so I missed spotting this one yesterday. Discussion: https://postgr.es/m/[email protected] Backpatch

pgsql: Make invalid primary_slot_name follow standard GUC error reporti

2025-10-22 Thread Fujii Masao
Make invalid primary_slot_name follow standard GUC error reporting. Previously, if primary_slot_name was set to an invalid slot name and the configuration file was reloaded, both the postmaster and all other backend processes reported a WARNING. With many processes running, this could produce a fl

pgsql: Make invalid primary_slot_name follow standard GUC error reporti

2025-10-22 Thread Fujii Masao
Make invalid primary_slot_name follow standard GUC error reporting. Previously, if primary_slot_name was set to an invalid slot name and the configuration file was reloaded, both the postmaster and all other backend processes reported a WARNING. With many processes running, this could produce a fl

pgsql: Make invalid primary_slot_name follow standard GUC error reporti

2025-10-22 Thread Fujii Masao
Make invalid primary_slot_name follow standard GUC error reporting. Previously, if primary_slot_name was set to an invalid slot name and the configuration file was reloaded, both the postmaster and all other backend processes reported a WARNING. With many processes running, this could produce a fl

pgsql: Make invalid primary_slot_name follow standard GUC error reporti

2025-10-22 Thread Fujii Masao
Make invalid primary_slot_name follow standard GUC error reporting. Previously, if primary_slot_name was set to an invalid slot name and the configuration file was reloaded, both the postmaster and all other backend processes reported a WARNING. With many processes running, this could produce a fl

pgsql: Make invalid primary_slot_name follow standard GUC error reporti

2025-10-22 Thread Fujii Masao
Make invalid primary_slot_name follow standard GUC error reporting. Previously, if primary_slot_name was set to an invalid slot name and the configuration file was reloaded, both the postmaster and all other backend processes reported a WARNING. With many processes running, this could produce a fl

pgsql: Make invalid primary_slot_name follow standard GUC error reporti

2025-10-22 Thread Fujii Masao
Make invalid primary_slot_name follow standard GUC error reporting. Previously, if primary_slot_name was set to an invalid slot name and the configuration file was reloaded, both the postmaster and all other backend processes reported a WARNING. With many processes running, this could produce a fl

pgsql: Make invalid primary_slot_name follow standard GUC error reporti

2025-10-22 Thread Fujii Masao
Make invalid primary_slot_name follow standard GUC error reporting. Previously, if primary_slot_name was set to an invalid slot name and the configuration file was reloaded, both the postmaster and all other backend processes reported a WARNING. With many processes running, this could produce a fl