pgsql: Clarify that pg_dump takes ACCESS SHARE lock

2022-06-30 Thread John Naylor
Clarify that pg_dump takes ACCESS SHARE lock Add link to the description of lock levels to avoid confusing "shared locks" with SHARE locks. Florin Irion Reviewed-by: Álvaro Herrera, Tom Lane, and Nathan Bossart Discussion: https://www.postgresql.org/message-id/flat/d0f30cc2-3c76-1d43-f291-7c4b2

pgsql: Harden dsm_impl.c against unexpected EEXIST.

2022-06-30 Thread Thomas Munro
Harden dsm_impl.c against unexpected EEXIST. Previously, we trusted the OS not to report EEXIST unless we'd passed in IPC_CREAT | IPC_EXCL or O_CREAT | O_EXCL, as appropriate. Solaris's shm_open() can in fact do that, causing us to crash because we didn't ereport and then we blithely assumed the

pgsql: Harden dsm_impl.c against unexpected EEXIST.

2022-06-30 Thread Thomas Munro
Harden dsm_impl.c against unexpected EEXIST. Previously, we trusted the OS not to report EEXIST unless we'd passed in IPC_CREAT | IPC_EXCL or O_CREAT | O_EXCL, as appropriate. Solaris's shm_open() can in fact do that, causing us to crash because we didn't ereport and then we blithely assumed the

pgsql: Harden dsm_impl.c against unexpected EEXIST.

2022-06-30 Thread Thomas Munro
Harden dsm_impl.c against unexpected EEXIST. Previously, we trusted the OS not to report EEXIST unless we'd passed in IPC_CREAT | IPC_EXCL or O_CREAT | O_EXCL, as appropriate. Solaris's shm_open() can in fact do that, causing us to crash because we didn't ereport and then we blithely assumed the

pgsql: Harden dsm_impl.c against unexpected EEXIST.

2022-06-30 Thread Thomas Munro
Harden dsm_impl.c against unexpected EEXIST. Previously, we trusted the OS not to report EEXIST unless we'd passed in IPC_CREAT | IPC_EXCL or O_CREAT | O_EXCL, as appropriate. Solaris's shm_open() can in fact do that, causing us to crash because we didn't ereport and then we blithely assumed the

pgsql: Harden dsm_impl.c against unexpected EEXIST.

2022-06-30 Thread Thomas Munro
Harden dsm_impl.c against unexpected EEXIST. Previously, we trusted the OS not to report EEXIST unless we'd passed in IPC_CREAT | IPC_EXCL or O_CREAT | O_EXCL, as appropriate. Solaris's shm_open() can in fact do that, causing us to crash because we didn't ereport and then we blithely assumed the

pgsql: Harden dsm_impl.c against unexpected EEXIST.

2022-06-30 Thread Thomas Munro
Harden dsm_impl.c against unexpected EEXIST. Previously, we trusted the OS not to report EEXIST unless we'd passed in IPC_CREAT | IPC_EXCL or O_CREAT | O_EXCL, as appropriate. Solaris's shm_open() can in fact do that, causing us to crash because we didn't ereport and then we blithely assumed the

pgsql: Harden dsm_impl.c against unexpected EEXIST.

2022-06-30 Thread Thomas Munro
Harden dsm_impl.c against unexpected EEXIST. Previously, we trusted the OS not to report EEXIST unless we'd passed in IPC_CREAT | IPC_EXCL or O_CREAT | O_EXCL, as appropriate. Solaris's shm_open() can in fact do that, causing us to crash because we didn't ereport and then we blithely assumed the

pgsql: Fix code comments still referring to pg_start/stop_backup()

2022-06-30 Thread Michael Paquier
Fix code comments still referring to pg_start/stop_backup() pg_start_backup() and pg_stop_backup() have been respectively renamed to pg_backup_start() and pg_backup_stop() as of 39969e2, but a few comments did not get the call. Reviewed-by: Kyotaro Horiguchi, David Steele Discussion: https://post

pgsql: Refactor the TAP test of auto_explain

2022-06-30 Thread Michael Paquier
Refactor the TAP test of auto_explain Previously, the tests were structured so as all the queries whose plans are checked run first, followed by pattern checks using the full set of server logs. This can be problematic when extending the tests, as this increases query plan overlaps, where two tes

pgsql: Change some unnecessary MemSet calls

2022-06-30 Thread Peter Eisentraut
Change some unnecessary MemSet calls MemSet() with a value other than 0 just falls back to memset(), so the indirection is unnecessary if the value is constant and not 0. Since there is some interest in getting rid of MemSet(), this gets some easy cases out of the way. (There are a few MemSet()

pgsql: Avoid unnecessary MemSet call

2022-06-30 Thread Peter Eisentraut
Avoid unnecessary MemSet call The variable in question was changed from a struct to a pointer some time ago (77947c51c08). Using MemSet to zero it still works but is obviously unidiomatic and confusing, so change it to a straight assignment. Author: Ranier Vilela Discussion: https://www.postgr

pgsql: Branch REL_15_STABLE was created

2022-06-30 Thread noreply
Branch REL_15_STABLE was created. View: https://git.postgresql.org/pg/shortlog/refs/heads/REL_15_STABLE

pgsql: Stamp HEAD as 16devel.

2022-06-30 Thread Tom Lane
Stamp HEAD as 16devel. Let the hacking begin ... Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d31d30973a190f69d414f7fc7b670771ac346a59 Modified Files -- configure| 18 +- configure.ac |2 +- doc/src/sgml/fileli

pgsql: Add 82d0ffae3 to git-blame-ignore-revs.

2022-06-30 Thread Tom Lane
Add 82d0ffae3 to git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/adadae45816e14caabeccf0324980136b996db4a Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: pgindent run prior to branching v15.

2022-06-30 Thread Tom Lane
pgindent run prior to branching v15. pgperltidy and reformat-dat-files too. Not many changes. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/82d0ffae3219e4bc153a1306ce23013d168e04a2 Modified Files -- src/backend/access/transam/xact.c | 2 +-