pgsql: Improve truncation of pg_serial/, removing "apparent wraparound"

2023-10-16 Thread Michael Paquier
Improve truncation of pg_serial/, removing "apparent wraparound" LOGs It is possible that the tail XID of pg_serial/ gets ahead of its head XID, which would cause the truncation of pg_serial/ done during checkpoints to show up as a "wraparound" LOG in SimpleLruTruncate(), which is confusing. This

pgsql: Run 006_login_trigger.pl only with Unix-domain sockets

2023-10-16 Thread Alexander Korotkov
Run 006_login_trigger.pl only with Unix-domain sockets Per report from buildfarm member drongo. Reported-by: Alexander Lakhin Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6fcaeb0ea26b963b0ca13ce6078df4c2c3135aa3 Modified Files -- src/test/authentica

pgsql: Restart the apply worker if the privileges have been revoked.

2023-10-16 Thread Amit Kapila
Restart the apply worker if the privileges have been revoked. Restart the apply worker if the subscription owner's superuser privileges have been revoked. This is required so that the subscription connection string gets revalidated and use the password option to connect to the publisher for non-su

pgsql: Add regression test coverage for timetz_izone().

2023-10-16 Thread Tom Lane
Add regression test coverage for timetz_izone(). Extend the test added by commit 97957fdba so that it also covers timetz_izone(), that is the "AT TIME ZONE interval" case. This is mostly to see if xlc's apparent bug occurs there too, but more code coverage is always welcome. Discussion: https://p

pgsql: Ensure we have a snapshot while dropping ON COMMIT DROP temp tab

2023-10-16 Thread Tom Lane
Ensure we have a snapshot while dropping ON COMMIT DROP temp tables. Dropping a temp table could entail TOAST table access to clean out toasted catalog entries, such as large pg_constraint.conbin strings for complex CHECK constraints. If we did that via ON COMMIT DROP, we triggered the assertion

pgsql: Ensure we have a snapshot while dropping ON COMMIT DROP temp tab

2023-10-16 Thread Tom Lane
Ensure we have a snapshot while dropping ON COMMIT DROP temp tables. Dropping a temp table could entail TOAST table access to clean out toasted catalog entries, such as large pg_constraint.conbin strings for complex CHECK constraints. If we did that via ON COMMIT DROP, we triggered the assertion

pgsql: Ensure we have a snapshot while dropping ON COMMIT DROP temp tab

2023-10-16 Thread Tom Lane
Ensure we have a snapshot while dropping ON COMMIT DROP temp tables. Dropping a temp table could entail TOAST table access to clean out toasted catalog entries, such as large pg_constraint.conbin strings for complex CHECK constraints. If we did that via ON COMMIT DROP, we triggered the assertion

pgsql: Ensure we have a snapshot while dropping ON COMMIT DROP temp tab

2023-10-16 Thread Tom Lane
Ensure we have a snapshot while dropping ON COMMIT DROP temp tables. Dropping a temp table could entail TOAST table access to clean out toasted catalog entries, such as large pg_constraint.conbin strings for complex CHECK constraints. If we did that via ON COMMIT DROP, we triggered the assertion

pgsql: Ensure we have a snapshot while dropping ON COMMIT DROP temp tab

2023-10-16 Thread Tom Lane
Ensure we have a snapshot while dropping ON COMMIT DROP temp tables. Dropping a temp table could entail TOAST table access to clean out toasted catalog entries, such as large pg_constraint.conbin strings for complex CHECK constraints. If we did that via ON COMMIT DROP, we triggered the assertion

pgsql: Ensure we have a snapshot while dropping ON COMMIT DROP temp tab

2023-10-16 Thread Tom Lane
Ensure we have a snapshot while dropping ON COMMIT DROP temp tables. Dropping a temp table could entail TOAST table access to clean out toasted catalog entries, such as large pg_constraint.conbin strings for complex CHECK constraints. If we did that via ON COMMIT DROP, we triggered the assertion

pgsql: Ensure we have a snapshot while dropping ON COMMIT DROP temp tab

2023-10-16 Thread Tom Lane
Ensure we have a snapshot while dropping ON COMMIT DROP temp tables. Dropping a temp table could entail TOAST table access to clean out toasted catalog entries, such as large pg_constraint.conbin strings for complex CHECK constraints. If we did that via ON COMMIT DROP, we triggered the assertion

pgsql: Move extra code out of the Pre/PostRestoreCommand() section.

2023-10-16 Thread Nathan Bossart
Move extra code out of the Pre/PostRestoreCommand() section. If SIGTERM is received within this section, the startup process will immediately proc_exit() in the signal handler, so it is inadvisable to include any more code than is required there (as such code is unlikely to be compatible with doin

pgsql: Move extra code out of the Pre/PostRestoreCommand() section.

2023-10-16 Thread Nathan Bossart
Move extra code out of the Pre/PostRestoreCommand() section. If SIGTERM is received within this section, the startup process will immediately proc_exit() in the signal handler, so it is inadvisable to include any more code than is required there (as such code is unlikely to be compatible with doin

pgsql: Move extra code out of the Pre/PostRestoreCommand() section.

2023-10-16 Thread Nathan Bossart
Move extra code out of the Pre/PostRestoreCommand() section. If SIGTERM is received within this section, the startup process will immediately proc_exit() in the signal handler, so it is inadvisable to include any more code than is required there (as such code is unlikely to be compatible with doin

pgsql: Update the documentation on recovering from (M)XID exhaustion.

2023-10-16 Thread Robert Haas
Update the documentation on recovering from (M)XID exhaustion. The old documentation encourages entering single-user mode for no reason, which is a bad plan in most cases. Instead, discourage users from doing that, and explain the limited cases in which it may be desirable. The old documentation

pgsql: Update the documentation on recovering from (M)XID exhaustion.

2023-10-16 Thread Robert Haas
Update the documentation on recovering from (M)XID exhaustion. The old documentation encourages entering single-user mode for no reason, which is a bad plan in most cases. Instead, discourage users from doing that, and explain the limited cases in which it may be desirable. The old documentation

pgsql: Update the documentation on recovering from (M)XID exhaustion.

2023-10-16 Thread Robert Haas
Update the documentation on recovering from (M)XID exhaustion. The old documentation encourages entering single-user mode for no reason, which is a bad plan in most cases. Instead, discourage users from doing that, and explain the limited cases in which it may be desirable. The old documentation

pgsql: Update the documentation on recovering from (M)XID exhaustion.

2023-10-16 Thread Robert Haas
Update the documentation on recovering from (M)XID exhaustion. The old documentation encourages entering single-user mode for no reason, which is a bad plan in most cases. Instead, discourage users from doing that, and explain the limited cases in which it may be desirable. The old documentation

pgsql: List 006_login_trigger.pl test for meson

2023-10-16 Thread Alexander Korotkov
List 006_login_trigger.pl test for meson Reported-by: Thomas Munro Discussion: https://postgr.es/m/CA%2BhUKGLuqDUaYYhJnA1H1q5Z-k18kQHoEqZ5fiXtTi4038nspg%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5abbd97fef6f18eef91bfed7d2057c39bd204702 Modif