pgsql: Improve comments for TidRangeEval

2025-06-13 Thread David Rowley
Improve comments for TidRangeEval Here we provide a bit more detail on why TidRangeEval() does return false when trss_mintid is greater than trss_maxtid. Reported-by: Junwang Zhao Author: David Rowley Reviewed-by: Junwang Zhao Discussion: https://postgr.es/m/CAEG8a3KUbUUqQgfK5X8Sj-%2BppPtGNTU

pgsql: doc: Add note about "Client User" and "Superuser" fields in \con

2025-06-13 Thread Fujii Masao
doc: Add note about "Client User" and "Superuser" fields in \conninfo output. In the \conninfo psql command, the "Client User" column shows the user who established the connection, while the "Superuser" column reflects whether the current user in the current execution context is a superuser. This

pgsql: psql: Report full protocol version in \conninfo output.

2025-06-13 Thread Fujii Masao
psql: Report full protocol version in \conninfo output. Commit bba2fbc6238 modified \conninfo to display the protocol version used by the current connection, but it only showed the major version (e.g., 3). This commit updates \conninfo to display the full protocol version (e.g., 3.2). Since suppo

pgsql: Keep WAL segments by the flushed value of the slot's restart LSN

2025-06-13 Thread Alexander Korotkov
Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are

pgsql: Keep WAL segments by the flushed value of the slot's restart LSN

2025-06-13 Thread Alexander Korotkov
Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are

pgsql: Keep WAL segments by the flushed value of the slot's restart LSN

2025-06-13 Thread Alexander Korotkov
Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are

pgsql: Keep WAL segments by the flushed value of the slot's restart LSN

2025-06-13 Thread Alexander Korotkov
Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are

pgsql: Keep WAL segments by the flushed value of the slot's restart LSN

2025-06-13 Thread Alexander Korotkov
Keep WAL segments by the flushed value of the slot's restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are

pgsql: Add TAP tests to check replication slot advance during the check

2025-06-13 Thread Alexander Korotkov
Add TAP tests to check replication slot advance during the checkpoint The new tests verify that logical and physical replication slots are still valid after an immediate restart on checkpoint completion when the slot was advanced during the checkpoint. This commit introduces two new injection poi

pgsql: Keep WAL segments by slot's last saved restart LSN

2025-06-13 Thread Alexander Korotkov
Keep WAL segments by slot's last saved restart LSN The patch fixes the issue with the unexpected removal of old WAL segments after checkpoint, followed by an immediate restart. The issue occurs when a slot is advanced after the start of the checkpoint and before old WAL segments are removed at th

pgsql: Add TAP tests to check replication slot advance during the check

2025-06-13 Thread Alexander Korotkov
Add TAP tests to check replication slot advance during the checkpoint The new tests verify that logical and physical replication slots are still valid after an immediate restart on checkpoint completion when the slot was advanced during the checkpoint. This commit introduces two new injection poi

pgsql: nbtree: _bt_readnextpage doesn't affect markPos.

2025-06-13 Thread Peter Geoghegan
nbtree: _bt_readnextpage doesn't affect markPos. _bt_readnextpage expects so->currPos.buf to be InvalidBuffer (and for the position's page to be unlocked) when called. However, it does not expect there to be no pins held on any page. In particular, so->markPos might hold a separate pin, both bef

pgsql: Comment fixups from 626df47ad9.

2025-06-13 Thread Jeff Davis
Comment fixups from 626df47ad9. Reported-by: Peter Smith Discussion: https://postgr.es/m/cahut+pspbhqmrcbl1c-opojetukuafffuqjd2rhdzqwurwc...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a0c7b765372d949cec54960dafcaadbc04b3204e Modified Files ---

pgsql: psql: Reword help message and docs for WATCH_INTERVAL

2025-06-13 Thread Daniel Gustafsson
psql: Reword help message and docs for WATCH_INTERVAL Reword the documentation around the default value to make interaction between WATCH_INTERVAL and the \watch command clearer. While there, also remove a stray parenthesis left over from a previous version of the patch. Reported-by: Peter Eisen