Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2021-01-07 Thread Michael Paquier
On Thu, Jan 07, 2021 at 05:25:24PM -0500, Tom Lane wrote: > So on this machine, setlocale() is lax about LC_COLLATE values as > well as (presumably) LC_CTYPE. Question then becomes why we did > not notice for nearly a year. It looks like, of the not-very-many > OpenBSD machines in the buildfarm,

pgsql: Fix and simplify some code related to cryptohashes

2021-01-07 Thread Michael Paquier
Fix and simplify some code related to cryptohashes This commit addresses two issues: - In pgcrypto, MD5 computation called pg_cryptohash_{init,update,final} without checking for the result status. - Simplify pg_checksum_raw_context to use only one variable for all the SHA2 options available in che

pgsql: Adjust createdb TAP tests to work on recent OpenBSD.

2021-01-07 Thread Tom Lane
Adjust createdb TAP tests to work on recent OpenBSD. We found last February that the error-case tests added by commit 008cf0409 failed on OpenBSD, because that platform doesn't really check locale names. At the time it seemed that that was only an issue for LC_CTYPE, but testing on a more recent

pgsql: Adjust createdb TAP tests to work on recent OpenBSD.

2021-01-07 Thread Tom Lane
Adjust createdb TAP tests to work on recent OpenBSD. We found last February that the error-case tests added by commit 008cf0409 failed on OpenBSD, because that platform doesn't really check locale names. At the time it seemed that that was only an issue for LC_CTYPE, but testing on a more recent

pgsql: Adjust createdb TAP tests to work on recent OpenBSD.

2021-01-07 Thread Tom Lane
Adjust createdb TAP tests to work on recent OpenBSD. We found last February that the error-case tests added by commit 008cf0409 failed on OpenBSD, because that platform doesn't really check locale names. At the time it seemed that that was only an issue for LC_CTYPE, but testing on a more recent

pgsql: Adjust createdb TAP tests to work on recent OpenBSD.

2021-01-07 Thread Tom Lane
Adjust createdb TAP tests to work on recent OpenBSD. We found last February that the error-case tests added by commit 008cf0409 failed on OpenBSD, because that platform doesn't really check locale names. At the time it seemed that that was only an issue for LC_CTYPE, but testing on a more recent

Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

2021-01-07 Thread Tom Lane
Michael Paquier writes: > On Thu, Feb 27, 2020 at 02:11:12PM +0900, Michael Paquier wrote: >> The best thing I can think of is just to remove the test case for >> --lc-ctype. > So, thinking about nothing better, I have just removed this test. I just tried to run check-world on an OpenBSD 6.8 ins

pgsql: Further second thoughts about idle_session_timeout patch.

2021-01-07 Thread Tom Lane
Further second thoughts about idle_session_timeout patch. On reflection, the order of operations in PostgresMain() is wrong. These timeouts ought to be shut down before, not after, we do the post-command-read CHECK_FOR_INTERRUPTS, to guarantee that any timeout error will be detected there rather t

pgsql: Further second thoughts about idle_session_timeout patch.

2021-01-07 Thread Tom Lane
Further second thoughts about idle_session_timeout patch. On reflection, the order of operations in PostgresMain() is wrong. These timeouts ought to be shut down before, not after, we do the post-command-read CHECK_FOR_INTERRUPTS, to guarantee that any timeout error will be detected there rather t

pgsql: Further second thoughts about idle_session_timeout patch.

2021-01-07 Thread Tom Lane
Further second thoughts about idle_session_timeout patch. On reflection, the order of operations in PostgresMain() is wrong. These timeouts ought to be shut down before, not after, we do the post-command-read CHECK_FOR_INTERRUPTS, to guarantee that any timeout error will be detected there rather t

pgsql: Further second thoughts about idle_session_timeout patch.

2021-01-07 Thread Tom Lane
Further second thoughts about idle_session_timeout patch. On reflection, the order of operations in PostgresMain() is wrong. These timeouts ought to be shut down before, not after, we do the post-command-read CHECK_FOR_INTERRUPTS, to guarantee that any timeout error will be detected there rather t

pgsql: Further second thoughts about idle_session_timeout patch.

2021-01-07 Thread Tom Lane
Further second thoughts about idle_session_timeout patch. On reflection, the order of operations in PostgresMain() is wrong. These timeouts ought to be shut down before, not after, we do the post-command-read CHECK_FOR_INTERRUPTS, to guarantee that any timeout error will be detected there rather t

pgsql: Further second thoughts about idle_session_timeout patch.

2021-01-07 Thread Tom Lane
Further second thoughts about idle_session_timeout patch. On reflection, the order of operations in PostgresMain() is wrong. These timeouts ought to be shut down before, not after, we do the post-command-read CHECK_FOR_INTERRUPTS, to guarantee that any timeout error will be detected there rather t

pgsql: Minor fixes in COPY progress docs

2021-01-07 Thread Tomas Vondra
Minor fixes in COPY progress docs Author: Justin Pryzby Discussion: https://postgr.es/m/CAFp7Qwr6_FmRM6pCO0x_a0mymOfX_Gg+FEKet4XaTGSW=li...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ebb5457cfa514972847a2d03b5b4fd46f69bdc9b Modified Files -

pgsql: Add GUC to log long wait times on recovery conflicts.

2021-01-07 Thread Fujii Masao
Add GUC to log long wait times on recovery conflicts. This commit adds GUC log_recovery_conflict_waits that controls whether a log message is produced when the startup process is waiting longer than deadlock_timeout for recovery conflicts. This is useful in determining if recovery conflicts preven

pgsql: doc: Remove reference to recovery params for divergence lookup i

2021-01-07 Thread Michael Paquier
doc: Remove reference to recovery params for divergence lookup in pg_rewind The documentation of pg_rewind mentioned the use of restore_command and primary_conninfo as options available at startup to fetch missing WAL segments that could be used to find the point of divergence for the rewind. Thi

pgsql: doc: Remove reference to recovery params for divergence lookup i

2021-01-07 Thread Michael Paquier
doc: Remove reference to recovery params for divergence lookup in pg_rewind The documentation of pg_rewind mentioned the use of restore_command and primary_conninfo as options available at startup to fetch missing WAL segments that could be used to find the point of divergence for the rewind. Thi

pgsql: doc: Remove reference to recovery params for divergence lookup i

2021-01-07 Thread Michael Paquier
doc: Remove reference to recovery params for divergence lookup in pg_rewind The documentation of pg_rewind mentioned the use of restore_command and primary_conninfo as options available at startup to fetch missing WAL segments that could be used to find the point of divergence for the rewind. Thi

pgsql: doc: Remove reference to recovery params for divergence lookup i

2021-01-07 Thread Michael Paquier
doc: Remove reference to recovery params for divergence lookup in pg_rewind The documentation of pg_rewind mentioned the use of restore_command and primary_conninfo as options available at startup to fetch missing WAL segments that could be used to find the point of divergence for the rewind. Thi