pgsql: Explicitly skip TAP tests under Meson if disabled

2023-11-15 Thread Peter Eisentraut
Explicitly skip TAP tests under Meson if disabled If the tap_tests option is disabled under Meson, the TAP tests are currently not registered at all. But this makes it harder to see what is going on, why suddently there are fewer tests than before. Instead, run testwrap with an option that marks

pgsql: Add target "slru" to pg_stat_reset_shared()

2023-11-15 Thread Michael Paquier
Add target "slru" to pg_stat_reset_shared() Currently, pg_stat_reset_shared() cannot reset the counters in the view pg_stat_slru even if it is a type of shared stats. This patch adds support for a new value in pg_stat_reset_shared(), called "slru", able to do that. Note that pg_stat_reset_shared

pgsql: psql: Add some completion support for CREATE TABLE .. AS

2023-11-15 Thread Michael Paquier
psql: Add some completion support for CREATE TABLE .. AS "AS" is added as a suggested keyword for CREATE TABLE for a few query patterns, including the case where a list of columns is given in parenthesis. More queries can be now completed with the keywords supported for queries in a CTAS, after:

pgsql: Fix fallback implementation for pg_atomic_test_set_flag().

2023-11-15 Thread Nathan Bossart
Fix fallback implementation for pg_atomic_test_set_flag(). The fallback implementation of pg_atomic_test_set_flag() that uses atomic-exchange gives pg_atomic_exchange_u32_impl() an extra argument. This issue has been present since the introduction of the atomics API in commit b64d92f1a5. Reviewe

pgsql: Fix fallback implementation for pg_atomic_test_set_flag().

2023-11-15 Thread Nathan Bossart
Fix fallback implementation for pg_atomic_test_set_flag(). The fallback implementation of pg_atomic_test_set_flag() that uses atomic-exchange gives pg_atomic_exchange_u32_impl() an extra argument. This issue has been present since the introduction of the atomics API in commit b64d92f1a5. Reviewe

pgsql: Fix fallback implementation for pg_atomic_test_set_flag().

2023-11-15 Thread Nathan Bossart
Fix fallback implementation for pg_atomic_test_set_flag(). The fallback implementation of pg_atomic_test_set_flag() that uses atomic-exchange gives pg_atomic_exchange_u32_impl() an extra argument. This issue has been present since the introduction of the atomics API in commit b64d92f1a5. Reviewe

pgsql: Fix fallback implementation for pg_atomic_test_set_flag().

2023-11-15 Thread Nathan Bossart
Fix fallback implementation for pg_atomic_test_set_flag(). The fallback implementation of pg_atomic_test_set_flag() that uses atomic-exchange gives pg_atomic_exchange_u32_impl() an extra argument. This issue has been present since the introduction of the atomics API in commit b64d92f1a5. Reviewe

pgsql: Fix fallback implementation for pg_atomic_test_set_flag().

2023-11-15 Thread Nathan Bossart
Fix fallback implementation for pg_atomic_test_set_flag(). The fallback implementation of pg_atomic_test_set_flag() that uses atomic-exchange gives pg_atomic_exchange_u32_impl() an extra argument. This issue has been present since the introduction of the atomics API in commit b64d92f1a5. Reviewe

pgsql: Fix fallback implementation for pg_atomic_test_set_flag().

2023-11-15 Thread Nathan Bossart
Fix fallback implementation for pg_atomic_test_set_flag(). The fallback implementation of pg_atomic_test_set_flag() that uses atomic-exchange gives pg_atomic_exchange_u32_impl() an extra argument. This issue has been present since the introduction of the atomics API in commit b64d92f1a5. Reviewe

pgsql: Retire MemoryContextResetAndDeleteChildren() macro.

2023-11-15 Thread Nathan Bossart
Retire MemoryContextResetAndDeleteChildren() macro. As of commit eaa5808e8e, MemoryContextResetAndDeleteChildren() is just a backwards compatibility macro for MemoryContextReset(). Now that some time has passed, this macro seems more likely to create confusion. This commit removes the macro and

pgsql: src/test/modules/test_dsa needs a .gitignore file.

2023-11-15 Thread Tom Lane
src/test/modules/test_dsa needs a .gitignore file. Without this, "git status" is unhappy after a check-world run. Oversight in 325f54033. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/83267b15bf0dffa6e1096608bda95b8488048bb9 Modified Files -- src/test

pgsql: doc: align column order with pg_stat_statements view

2023-11-15 Thread Daniel Gustafsson
doc: align column order with pg_stat_statements view Commit 5a3423ad8e mistakenly didn't plac the new columns for JIT deform counters at the end to match their placement in the view. Fix by placing the new columns last to be consistent. Author: Julien Rouhaud Discussion: https://postgr.es/m/fuh

pgsql: Fix dsa.c with different resource owners.

2023-11-15 Thread Heikki Linnakangas
Fix dsa.c with different resource owners. The comments in dsa.c suggested that areas were owned by resource owners, but it was not in fact tracked explicitly. The DSM attachments held by the dsa were owned by resource owners, but not the area itself. That led to confusion if you used one resource

pgsql: Add test_dsa module.

2023-11-15 Thread Heikki Linnakangas
Add test_dsa module. This covers basic calls within a single backend process, and also calling dsa_allocate() or dsa_get_address() while in a different resource owners. The latter case was fixed by the previous commit. Discussion: https://www.postgresql.org/message-id/11b70743-c5f3-3910-8e5b-dd6

pgsql: Clear CurrentResourceOwner earlier in CommitTransaction.

2023-11-15 Thread Heikki Linnakangas
Clear CurrentResourceOwner earlier in CommitTransaction. Alexander reported a crash with repeated create + drop database, after the ResourceOwner rewrite (commit b8bff07daa). That was fixed by the previous commit, but it nevertheless seems like a good idea clear CurrentResourceOwner earlier, becau