pgsql: pgstat: fix subscription stats entry leak.

2023-07-04 Thread Masahiko Sawada
pgstat: fix subscription stats entry leak. Commit 7b64e4b3 taught DropSubscription() to drop stats entry of subscription that is not associated with a replication slot for apply worker at DROP SUBSCRIPTION but missed covering the case where the subscription is not associated with replication

pgsql: pgstat: fix subscription stats entry leak.

2023-07-04 Thread Masahiko Sawada
pgstat: fix subscription stats entry leak. Commit 7b64e4b3 taught DropSubscription() to drop stats entry of subscription that is not associated with a replication slot for apply worker at DROP SUBSCRIPTION but missed covering the case where the subscription is not associated with replication

pgsql: pgstat: fix subscription stats entry leak.

2023-07-04 Thread Masahiko Sawada
pgstat: fix subscription stats entry leak. Commit 7b64e4b3 taught DropSubscription() to drop stats entry of subscription that is not associated with a replication slot for apply worker at DROP SUBSCRIPTION but missed covering the case where the subscription is not associated with replication

pgsql: Clean up command argument assembly

2023-07-04 Thread Peter Eisentraut
Clean up command argument assembly Several commands internally assemble command lines to call other commands. This includes initdb, pg_dumpall, and pg_regress. (Also pg_ctl, but that is different enough that I didn't consider it here.) This has all evolved a bit organically, with fixed-size

pgsql: Generate automatically code and documentation related to wait ev

2023-07-04 Thread Michael Paquier
Generate automatically code and documentation related to wait events The documentation and the code is generated automatically from a new file called wait_event_names.txt, formatted in sections dedicated to each wait event class (Timeout, Lock, IO, etc.) with three tab-separated fields: - C

pgsql: Fix assertion failure in snapshot building

2023-07-04 Thread Daniel Gustafsson
Fix assertion failure in snapshot building Clear any potential stale next_phase_at value from the snapshot builder which otherwise may trip an assertion check ensuring that there is no next_phase_at value. This can be reproduced by running 80 concurrent sessions like the below where $c is a loop

pgsql: Fix assertion failure in snapshot building

2023-07-04 Thread Daniel Gustafsson
Fix assertion failure in snapshot building Clear any potential stale next_phase_at value from the snapshot builder which otherwise may trip an assertion check ensuring that there is no next_phase_at value. This can be reproduced by running 80 concurrent sessions like the below where $c is a loop

pgsql: Ensure that creation of an empty relfile is fsync'd at checkpoin

2023-07-04 Thread Heikki Linnakangas
Ensure that creation of an empty relfile is fsync'd at checkpoint. If you create a table and don't insert any data into it, the relation file is never fsync'd. You don't lose data, because an empty table doesn't have any data to begin with, but if you crash and lose the file, subsequent

pgsql: Ensure that creation of an empty relfile is fsync'd at checkpoin

2023-07-04 Thread Heikki Linnakangas
Ensure that creation of an empty relfile is fsync'd at checkpoint. If you create a table and don't insert any data into it, the relation file is never fsync'd. You don't lose data, because an empty table doesn't have any data to begin with, but if you crash and lose the file, subsequent

pgsql: Ensure that creation of an empty relfile is fsync'd at checkpoin

2023-07-04 Thread Heikki Linnakangas
Ensure that creation of an empty relfile is fsync'd at checkpoint. If you create a table and don't insert any data into it, the relation file is never fsync'd. You don't lose data, because an empty table doesn't have any data to begin with, but if you crash and lose the file, subsequent

pgsql: Ensure that creation of an empty relfile is fsync'd at checkpoin

2023-07-04 Thread Heikki Linnakangas
Ensure that creation of an empty relfile is fsync'd at checkpoint. If you create a table and don't insert any data into it, the relation file is never fsync'd. You don't lose data, because an empty table doesn't have any data to begin with, but if you crash and lose the file, subsequent

pgsql: Ensure that creation of an empty relfile is fsync'd at checkpoin

2023-07-04 Thread Heikki Linnakangas
Ensure that creation of an empty relfile is fsync'd at checkpoint. If you create a table and don't insert any data into it, the relation file is never fsync'd. You don't lose data, because an empty table doesn't have any data to begin with, but if you crash and lose the file, subsequent

pgsql: Ensure that creation of an empty relfile is fsync'd at checkpoin

2023-07-04 Thread Heikki Linnakangas
Ensure that creation of an empty relfile is fsync'd at checkpoint. If you create a table and don't insert any data into it, the relation file is never fsync'd. You don't lose data, because an empty table doesn't have any data to begin with, but if you crash and lose the file, subsequent

pgsql: Ensure that creation of an empty relfile is fsync'd at checkpoin

2023-07-04 Thread Heikki Linnakangas
Ensure that creation of an empty relfile is fsync'd at checkpoint. If you create a table and don't insert any data into it, the relation file is never fsync'd. You don't lose data, because an empty table doesn't have any data to begin with, but if you crash and lose the file, subsequent

pgsql: Remove incidental md5() function uses from several tests

2023-07-04 Thread Peter Eisentraut
Remove incidental md5() function uses from several tests This removes md5() function calls from these test suites: - bloom - test_decoding - isolation - recovery - subscription This covers all remaining test suites where md5() calls were just used to generate some random data and can be

pgsql: Allow Incremental Sorts on GiST and SP-GiST indexes

2023-07-04 Thread David Rowley
Allow Incremental Sorts on GiST and SP-GiST indexes Previously an "amcanorderbyop" index would only be used when the index could provide sorted results which satisfied all query_pathkeys. Here we relax this so that we also allow these indexes to be considered by the planner when they only

Re: pgsql: ci: Change macOS builds from Intel to ARM.

2023-07-04 Thread Peter Eisentraut
On 29.06.23 15:42, Daniel Gustafsson wrote: On 29 Jun 2023, at 11:20, Peter Eisentraut wrote: On 31.12.22 22:46, Thomas Munro wrote: ci: Change macOS builds from Intel to ARM. I would like to backpatch the changes to src/test/kerberos/t/001_auth.pl and src/test/ldap/t/001_auth.pl further,

pgsql: Adjust kerberos and ldap tests for Homebrew on ARM

2023-07-04 Thread Peter Eisentraut
Adjust kerberos and ldap tests for Homebrew on ARM The Homebrew package manager changed its default installation prefix for the new architecture, so a couple of tests need tweaks to find binaries. This is a partial backpatch of dc513bc654. Branch -- REL_12_STABLE Details ---

pgsql: Adjust kerberos and ldap tests for Homebrew on ARM

2023-07-04 Thread Peter Eisentraut
Adjust kerberos and ldap tests for Homebrew on ARM The Homebrew package manager changed its default installation prefix for the new architecture, so a couple of tests need tweaks to find binaries. This is a partial backpatch of dc513bc654. Branch -- REL_14_STABLE Details ---

pgsql: Adjust kerberos and ldap tests for Homebrew on ARM

2023-07-04 Thread Peter Eisentraut
Adjust kerberos and ldap tests for Homebrew on ARM The Homebrew package manager changed its default installation prefix for the new architecture, so a couple of tests need tweaks to find binaries. This is a partial backpatch of dc513bc654. Branch -- REL_11_STABLE Details ---

pgsql: Adjust kerberos and ldap tests for Homebrew on ARM

2023-07-04 Thread Peter Eisentraut
Adjust kerberos and ldap tests for Homebrew on ARM The Homebrew package manager changed its default installation prefix for the new architecture, so a couple of tests need tweaks to find binaries. This is a partial backpatch of dc513bc654. Branch -- REL_13_STABLE Details ---