pgsql: Fix sslsni connparam boolean check

2021-08-13 Thread Daniel Gustafsson
Fix sslsni connparam boolean check The check for sslsni only checked for existence of the parameter but not for the actual value of the param. This meant that the SNI extension was always turned on. Fix by inspecting the value of sslsni and only activate the SNI extension iff sslsni has been ena

pgsql: Fix sslsni connparam boolean check

2021-08-13 Thread Daniel Gustafsson
Fix sslsni connparam boolean check The check for sslsni only checked for existence of the parameter but not for the actual value of the param. This meant that the SNI extension was always turned on. Fix by inspecting the value of sslsni and only activate the SNI extension iff sslsni has been ena

pgsql: Fix connection handling for DEALLOCATE and DESCRIBE statements

2021-08-13 Thread Michael Meskes
Fix connection handling for DEALLOCATE and DESCRIBE statements After binding a statement to a connection with DECLARE STATEMENT the connection was still not used for DEALLOCATE and DESCRIBE statements. This patch fixes that, adds a missing warning and cleans up the code. Author: Hayato Kuroda Rev

pgsql: Fix connection handling for DEALLOCATE and DESCRIBE statements

2021-08-13 Thread Michael Meskes
Fix connection handling for DEALLOCATE and DESCRIBE statements After binding a statement to a connection with DECLARE STATEMENT the connection was still not used for DEALLOCATE and DESCRIBE statements. This patch fixes that, adds a missing warning and cleans up the code. Author: Hayato Kuroda Rev

pgsql: Fix typo.

2021-08-13 Thread Andres Freund
Fix typo. Reported-By: Michael Paquier Discussion: https://postgr.es/m/yrilnqhlnfx55...@paquier.xyz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1d5135f0043b32a7d9fdc66a9553c2078900e240 Modified Files -- src/backend/utils/init/postinit.c | 2 +- 1 fi

Re: pgsql: Move temporary file cleanup to before_shmem_exit().

2021-08-13 Thread Andres Freund
On 2021-08-10 16:05:25 +0900, Michael Paquier wrote: > On Sun, Aug 08, 2021 at 02:23:06AM +, Andres Freund wrote: > > Move temporary file cleanup to before_shmem_exit(). > > > > As reported by a few OSX buildfarm animals there exist at least one path > > where > > temporary files exist during

pgsql: Remove support for background workers without BGWORKER_SHMEM_ACC

2021-08-13 Thread Andres Freund
Remove support for background workers without BGWORKER_SHMEM_ACCESS. Background workers without shared memory access have been broken on EXEC_BACKEND / windows builds since shortly after background workers have been introduced, without that being reported. Clearly they are not commonly used. The

Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-13 Thread Amit Kapila
On Thu, Aug 12, 2021 at 6:18 PM Andres Freund wrote: > > Hi, > > On 2021-08-12 15:06:23 +0530, Amit Kapila wrote: > > On Thu, Aug 12, 2021 at 1:52 PM Andres Freund wrote: > > > I'm not so sure. Why does sharedfileset have its own proc exit hook in the > > > first place? ISTM that this should be d

Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-13 Thread Amit Kapila
On Thu, Aug 12, 2021 at 6:24 PM Andres Freund wrote: > > On 2021-08-12 05:48:19 -0700, Andres Freund wrote: > > I think SharedFileSetInit() needs a comment explaining that it needs to be > > called in a process-lifetime memory context if used without dsm > > segments. Because otherwise SharedFileS

pgsql: pg_amcheck: Message style and structuring improvements

2021-08-13 Thread Peter Eisentraut
pg_amcheck: Message style and structuring improvements Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4279e5bc8c0b3a0cb6b6d3f1316ae81cd0028447 Modified Files -- src/bin/pg_amcheck/pg_amcheck.c | 31 --- src/bin/pg_am

pgsql: pg_amcheck: Message style and structuring improvements

2021-08-13 Thread Peter Eisentraut
pg_amcheck: Message style and structuring improvements Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e546d1d052f220b077cf4d9fee8e6d5bf85911c5 Modified Files -- src/bin/pg_amcheck/pg_amcheck.c | 31 --- src/bi

pgsql: Add RISC-V spinlock support in s_lock.h.

2021-08-13 Thread Tom Lane
Add RISC-V spinlock support in s_lock.h. Like the ARM case, just use gcc's __sync_lock_test_and_set(); that will compile into AMOSWAP.W.AQ which does what we need. At some point it might be worth doing some work on atomic ops for RISC-V, but this should be enough for a creditable port. Back-patc

pgsql: Add RISC-V spinlock support in s_lock.h.

2021-08-13 Thread Tom Lane
Add RISC-V spinlock support in s_lock.h. Like the ARM case, just use gcc's __sync_lock_test_and_set(); that will compile into AMOSWAP.W.AQ which does what we need. At some point it might be worth doing some work on atomic ops for RISC-V, but this should be enough for a creditable port. Back-patc

pgsql: Add RISC-V spinlock support in s_lock.h.

2021-08-13 Thread Tom Lane
Add RISC-V spinlock support in s_lock.h. Like the ARM case, just use gcc's __sync_lock_test_and_set(); that will compile into AMOSWAP.W.AQ which does what we need. At some point it might be worth doing some work on atomic ops for RISC-V, but this should be enough for a creditable port. Back-patc

pgsql: Add RISC-V spinlock support in s_lock.h.

2021-08-13 Thread Tom Lane
Add RISC-V spinlock support in s_lock.h. Like the ARM case, just use gcc's __sync_lock_test_and_set(); that will compile into AMOSWAP.W.AQ which does what we need. At some point it might be worth doing some work on atomic ops for RISC-V, but this should be enough for a creditable port. Back-patc

pgsql: Add RISC-V spinlock support in s_lock.h.

2021-08-13 Thread Tom Lane
Add RISC-V spinlock support in s_lock.h. Like the ARM case, just use gcc's __sync_lock_test_and_set(); that will compile into AMOSWAP.W.AQ which does what we need. At some point it might be worth doing some work on atomic ops for RISC-V, but this should be enough for a creditable port. Back-patc

pgsql: Add RISC-V spinlock support in s_lock.h.

2021-08-13 Thread Tom Lane
Add RISC-V spinlock support in s_lock.h. Like the ARM case, just use gcc's __sync_lock_test_and_set(); that will compile into AMOSWAP.W.AQ which does what we need. At some point it might be worth doing some work on atomic ops for RISC-V, but this should be enough for a creditable port. Back-patc

pgsql: Add RISC-V spinlock support in s_lock.h.

2021-08-13 Thread Tom Lane
Add RISC-V spinlock support in s_lock.h. Like the ARM case, just use gcc's __sync_lock_test_and_set(); that will compile into AMOSWAP.W.AQ which does what we need. At some point it might be worth doing some work on atomic ops for RISC-V, but this should be enough for a creditable port. Back-patc

pgsql: Un-break s_lock_test.

2021-08-13 Thread Tom Lane
Un-break s_lock_test. Commit 80abbeba2 evidently didn't bother checking this code. Also, list the generated executable in .gitignore (so it's been a REALLY long time since anyone tried this). Noted while trying out RISC-V spinlock patch. Given that this has been broken for 5 years and nobody not