pgsql: Add wait event for pg_usleep() in perform_spin_delay()

2022-11-21 Thread Andres Freund
Add wait event for pg_usleep() in perform_spin_delay() The lwlock wait queue scalability issue fixed in a4adc31f690 was quite hard to find because of the exponential backoff and because we adjust spins_per_delay over time within a backend. To make it easier to find similar issues in the future, a

pgsql: doc: Fix description of pg_stat_all_tables.n_tup_upd

2022-11-21 Thread Michael Paquier
doc: Fix description of pg_stat_all_tables.n_tup_upd Issue caused by an incorrect merge done in f507895. This issue only impacts v11 and v12. Author: Guillaume Lelarge Discussion: https://postgr.es/m/caectzeual3qoeblbdnn2dfwys0kww-yqdicqq3r+js5yu1n...@mail.gmail.com Backpatch-through: 11 Branc

pgsql: doc: Fix description of pg_stat_all_tables.n_tup_upd

2022-11-21 Thread Michael Paquier
doc: Fix description of pg_stat_all_tables.n_tup_upd Issue caused by an incorrect merge done in f507895. This issue only impacts v11 and v12. Author: Guillaume Lelarge Discussion: https://postgr.es/m/caectzeual3qoeblbdnn2dfwys0kww-yqdicqq3r+js5yu1n...@mail.gmail.com Backpatch-through: 11 Branc

pgsql: ci: Use -fsanitize=undefined,alignment,address in linux tasks

2022-11-21 Thread Andres Freund
ci: Use -fsanitize=undefined,alignment,address in linux tasks We have coverage of the various sanitizers in the buildfarm. The sanitizers however particularly interesting during the development of patches, where the likelihood of bugs is even higher. There also have been complaints about only seei

pgsql: ci: Introduce SanityCheck task that other tasks depend on

2022-11-21 Thread Andres Freund
ci: Introduce SanityCheck task that other tasks depend on To avoid unnecessarily spinning up a lot of VMs / containers for entirely broken commits, have a minimal task that all others depend on. The concrete motivation for the change is to use sanitizers in the linux tasks. As that makes the test

pgsql: ci: Clean up pre-meson cruft in windows task

2022-11-21 Thread Andres Freund
ci: Clean up pre-meson cruft in windows task We don't need CIRRUS_ESCAPING_PROCESSES anymore as the whole tests now run within a single script: block. We don't need NO_TEMP_INSTALL anymore it was addressing an issue specific to vcregress.pl. Author: Justin Pryzby Discussion: https://postgr.es/m/

pgsql: Replace link to Hunspell with the current homepage

2022-11-21 Thread Daniel Gustafsson
Replace link to Hunspell with the current homepage The Hunspell project moved from Sourceforge to Github sometime in 2016, so update our links to match the new URL. Backpatch the doc changes to all supported versions. Discussion: https://postgr.es/m/[email protected]

pgsql: Replace link to Hunspell with the current homepage

2022-11-21 Thread Daniel Gustafsson
Replace link to Hunspell with the current homepage The Hunspell project moved from Sourceforge to Github sometime in 2016, so update our links to match the new URL. Backpatch the doc changes to all supported versions. Discussion: https://postgr.es/m/[email protected]

pgsql: Replace link to Hunspell with the current homepage

2022-11-21 Thread Daniel Gustafsson
Replace link to Hunspell with the current homepage The Hunspell project moved from Sourceforge to Github sometime in 2016, so update our links to match the new URL. Backpatch the doc changes to all supported versions. Discussion: https://postgr.es/m/[email protected]

pgsql: Replace link to Hunspell with the current homepage

2022-11-21 Thread Daniel Gustafsson
Replace link to Hunspell with the current homepage The Hunspell project moved from Sourceforge to Github sometime in 2016, so update our links to match the new URL. Backpatch the doc changes to all supported versions. Discussion: https://postgr.es/m/[email protected]

pgsql: Replace link to Hunspell with the current homepage

2022-11-21 Thread Daniel Gustafsson
Replace link to Hunspell with the current homepage The Hunspell project moved from Sourceforge to Github sometime in 2016, so update our links to match the new URL. Backpatch the doc changes to all supported versions. Discussion: https://postgr.es/m/[email protected]

pgsql: Replace link to Hunspell with the current homepage

2022-11-21 Thread Daniel Gustafsson
Replace link to Hunspell with the current homepage The Hunspell project moved from Sourceforge to Github sometime in 2016, so update our links to match the new URL. Backpatch the doc changes to all supported versions. Discussion: https://postgr.es/m/[email protected]

pgsql: Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline.

2022-11-21 Thread Tom Lane
Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. I just spent an annoying amount of time reverse-engineering the 100%-undocumented API between ts_headline and the text search parser's prsheadline function. Add some commentary about that while it's fresh in mind. Also remove some u

pgsql: Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline.

2022-11-21 Thread Tom Lane
Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. I just spent an annoying amount of time reverse-engineering the 100%-undocumented API between ts_headline and the text search parser's prsheadline function. Add some commentary about that while it's fresh in mind. Also remove some u

pgsql: Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline.

2022-11-21 Thread Tom Lane
Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. I just spent an annoying amount of time reverse-engineering the 100%-undocumented API between ts_headline and the text search parser's prsheadline function. Add some commentary about that while it's fresh in mind. Also remove some u

pgsql: Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline.

2022-11-21 Thread Tom Lane
Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. I just spent an annoying amount of time reverse-engineering the 100%-undocumented API between ts_headline and the text search parser's prsheadline function. Add some commentary about that while it's fresh in mind. Also remove some u

pgsql: Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline.

2022-11-21 Thread Tom Lane
Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. I just spent an annoying amount of time reverse-engineering the 100%-undocumented API between ts_headline and the text search parser's prsheadline function. Add some commentary about that while it's fresh in mind. Also remove some u

pgsql: Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline.

2022-11-21 Thread Tom Lane
Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. I just spent an annoying amount of time reverse-engineering the 100%-undocumented API between ts_headline and the text search parser's prsheadline function. Add some commentary about that while it's fresh in mind. Also remove some u

pgsql: Add workaround to make ubsan and ps_status.c compatible

2022-11-21 Thread Andres Freund
Add workaround to make ubsan and ps_status.c compatible At least on linux, set_ps_display() breaks /proc/$pid/environ. The sanitizer's helper library uses /proc/$pid/environ to implement getenv(), as it wants to work independent of libc. When just using undefined and alignment sanitizers, the sani

pgsql: Revert "Prevent instability in contrib/pageinspect's regression

2022-11-21 Thread Tom Lane
Revert "Prevent instability in contrib/pageinspect's regression test." This reverts commit 5cda142bb9d2bd7e7ed1c22ae89afe58abfa8d7b (in v14 only). It turns out that that fails under force_parallel_mode = regress, because pageinspect's disk-access functions are marked parallel safe, which they are

pgsql: Mark pageinspect's disk-accessing functions as parallel restrict

2022-11-21 Thread Tom Lane
Mark pageinspect's disk-accessing functions as parallel restricted. These functions have been marked parallel safe, but the buildfarm's response to commit e2933a6e1 exposed the flaw in that thinking: if you try to use them on a temporary table, and they run inside a parallel worker, they'll fail w

pgsql: Mark pageinspect's disk-accessing functions as parallel restrict

2022-11-21 Thread Tom Lane
Mark pageinspect's disk-accessing functions as parallel restricted. These functions have been marked parallel safe, but the buildfarm's response to commit e2933a6e1 exposed the flaw in that thinking: if you try to use them on a temporary table, and they run inside a parallel worker, they'll fail w

Re: pgsql: Prevent instability in contrib/pageinspect's regression test.

2022-11-21 Thread Tom Lane
Andres Freund writes: > Looks like a chunk of the buildfarm doesn't like this - presumably because > they use force_parallel_mode = regress. Seems ok to just force that to off in > this test? Ugh ... didn't occur to me to try that. I'll take a look. regards, tom lane

Re: pgsql: Prevent instability in contrib/pageinspect's regression test.

2022-11-21 Thread Andres Freund
Hi, On 2022-11-21 15:51:05 +, Tom Lane wrote: > Prevent instability in contrib/pageinspect's regression test. > > pageinspect has occasionally failed on slow buildfarm members, > with symptoms indicating that the expected effects of VACUUM > FREEZE didn't happen. This is presumably because a

pgsql: Provide options for postmaster to kill child processes with SIGA

2022-11-21 Thread Tom Lane
Provide options for postmaster to kill child processes with SIGABRT. The postmaster normally sends SIGQUIT to force-terminate its child processes after a child crash or immediate-stop request. If that doesn't result in child exit within a few seconds, we follow it up with SIGKILL. This patch prov

pgsql: Prevent instability in contrib/pageinspect's regression test.

2022-11-21 Thread Tom Lane
Prevent instability in contrib/pageinspect's regression test. pageinspect has occasionally failed on slow buildfarm members, with symptoms indicating that the expected effects of VACUUM FREEZE didn't happen. This is presumably because a background transaction such as auto-analyze was holding back

pgsql: Prevent instability in contrib/pageinspect's regression test.

2022-11-21 Thread Tom Lane
Prevent instability in contrib/pageinspect's regression test. pageinspect has occasionally failed on slow buildfarm members, with symptoms indicating that the expected effects of VACUUM FREEZE didn't happen. This is presumably because a background transaction such as auto-analyze was holding back

pgsql: Prevent instability in contrib/pageinspect's regression test.

2022-11-21 Thread Tom Lane
Prevent instability in contrib/pageinspect's regression test. pageinspect has occasionally failed on slow buildfarm members, with symptoms indicating that the expected effects of VACUUM FREEZE didn't happen. This is presumably because a background transaction such as auto-analyze was holding back

pgsql: Replace SQLValueFunction by COERCE_SQL_SYNTAX

2022-11-21 Thread Michael Paquier
Replace SQLValueFunction by COERCE_SQL_SYNTAX This switch impacts 9 patterns related to a SQL-mandated special syntax for function calls: - LOCALTIME [ ( typmod ) ] - LOCALTIMESTAMP [ ( typmod ) ] - CURRENT_TIME [ ( typmod ) ] - CURRENT_TIMESTAMP [ ( typmod ) ] - CURRENT_DATE Five new entries are