pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this removes

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this removes

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this removes

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this removes

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this removes

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this removes

pgsql: Fix BF introduced in commit ddd5f4f54a.

2024-02-14 Thread Amit Kapila
Fix BF introduced in commit ddd5f4f54a. The failure is that the remote slot is not synchronized after the same slot on standby gets invalidated. The reason was that remote_slot's restart_lsn was lagged behind the standby's oldest WAL segment. The test didn't ensure that remote_slot's LSN was advan

pgsql: Fix multiranges to behave more like dependent types.

2024-02-14 Thread Tom Lane
Fix multiranges to behave more like dependent types. For most purposes, multiranges act like dependent objects of the associated range type: you can't create them separately or drop them separately. This is like the way that autogenerated array types behave. However, a couple of points were over

pgsql: Allow pg_monitor to execute pg_current_logfile().

2024-02-14 Thread Nathan Bossart
Allow pg_monitor to execute pg_current_logfile(). We allow roles with privileges of pg_monitor to execute functions like pg_ls_logdir(), so it seems natural that such roles would also be able to execute this function. Bumps catversion. Co-authored-by: Pavlo Golub Reviewed-by: Daniel Gustafsson D

pgsql: Check that MyProcPid == getpid() in backend signal handlers.

2024-02-14 Thread Nathan Bossart
Check that MyProcPid == getpid() in backend signal handlers. In commit 97550c0711, we added a similar check to the SIGTERM handler for the startup process. This commit adds this check to backend signal handlers installed with pqsignal(). This is done by using a wrapper function that performs the

pgsql: Centralize logic for restoring errno in signal handlers.

2024-02-14 Thread Nathan Bossart
Centralize logic for restoring errno in signal handlers. Presently, we rely on each individual signal handler to save the initial value of errno and then restore it before returning if needed. This is easily forgotten and, if missed, often goes undetected for a long time. In commit 3b00fdba9f, w

pgsql: Remove obsolete check in SIGTERM handler for the startup process

2024-02-14 Thread Nathan Bossart
Remove obsolete check in SIGTERM handler for the startup process. Thanks to commit 3b00fdba9f, this check in the SIGTERM handler for the startup process is now obsolete and can be removed. Instead of leaving around the dead function write_stderr_signal_safe(), I've opted to just remove it for now

pgsql: Clarify the 'rows' parameter in create_append_path

2024-02-14 Thread David Rowley
Clarify the 'rows' parameter in create_append_path This is extracted from a larger patch to improve the UNION planner. While working on that, I found myself having to check what the 'rows' parameter is for. It's not obvious that passing a negative number is the way to have the rows estimate calcu

pgsql: Simplify PathKey checking code

2024-02-14 Thread David Rowley
Simplify PathKey checking code pathkeys_useful_for_ordering() contained some needless checks to return 0 when either root->query_pathkeys or pathkeys lists were empty. This is already handled by pathkeys_count_contained_in(), so let's have it do the work instead of having redundant checks. Simil

pgsql: Another try to fix BF failure introduced in commit ddd5f4f54a.

2024-02-14 Thread Amit Kapila
Another try to fix BF failure introduced in commit ddd5f4f54a. Before attempting to sync the slot on standby by pg_sync_replication_slots(), ensure that on the primary restart_lsn for the slot has moved to a recent WAL position, by re-creating the subscription and the logical slot. Author: Hou Zh