pgsql: Check that xmax didn't commit in freeze check.

2023-01-03 Thread Peter Geoghegan
Check that xmax didn't commit in freeze check. We cannot rely on TransactionIdDidAbort here, since in general it may report transactions that were in-progress at the time of an earlier hard crash as not aborted, effectively behaving as if they were still in progress even after crash recovery compl

pgsql: Update obsolete multixact.c comments.

2023-01-03 Thread Peter Geoghegan
Update obsolete multixact.c comments. Commit 4f627f89 switched SLRU truncation for multixacts back to being a task performed during VACUUM, but missed some comments that continued to reference truncation happening as part of checkpointing. Update those comments now. Also update comments that bec

pgsql: During pg_dump startup, acquire table locks in batches.

2023-01-03 Thread Tom Lane
During pg_dump startup, acquire table locks in batches. Combine multiple LOCK TABLE commands to reduce the number of round trips to the server. This is particularly helpful when dumping from a remote server, but it seems useful even without that. In particular, shortening the time from seeing a

pgsql: Fix typo in memutils_memorychunk.h

2023-01-03 Thread David Rowley
Fix typo in memutils_memorychunk.h Author: Richard Guo Discussion: https://postgr.es/m/cambws483cyjholh32_hd3yq1njfravndl2zy7+e7pwvfpjf...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b23837dde48028f9e31983c765c32e3f42cb7ef2 Modified Files --

pgsql: Improve documentation of the CREATEROLE attibute.

2023-01-03 Thread Robert Haas
Improve documentation of the CREATEROLE attibute. In user-manag.sgml, document precisely what privileges are conveyed by CREATEROLE. Make particular note of the fact that it allows changing passwords and granting access to high-privilege roles. Also remove the suggestion of using a user with CREAT

pgsql: Improve documentation of the CREATEROLE attibute.

2023-01-03 Thread Robert Haas
Improve documentation of the CREATEROLE attibute. In user-manag.sgml, document precisely what privileges are conveyed by CREATEROLE. Make particular note of the fact that it allows changing passwords and granting access to high-privilege roles. Also remove the suggestion of using a user with CREAT

pgsql: Improve documentation of the CREATEROLE attibute.

2023-01-03 Thread Robert Haas
Improve documentation of the CREATEROLE attibute. In user-manag.sgml, document precisely what privileges are conveyed by CREATEROLE. Make particular note of the fact that it allows changing passwords and granting access to high-privilege roles. Also remove the suggestion of using a user with CREAT

pgsql: Improve documentation of the CREATEROLE attibute.

2023-01-03 Thread Robert Haas
Improve documentation of the CREATEROLE attibute. In user-manag.sgml, document precisely what privileges are conveyed by CREATEROLE. Make particular note of the fact that it allows changing passwords and granting access to high-privilege roles. Also remove the suggestion of using a user with CREAT

pgsql: Improve documentation of the CREATEROLE attibute.

2023-01-03 Thread Robert Haas
Improve documentation of the CREATEROLE attibute. In user-manag.sgml, document precisely what privileges are conveyed by CREATEROLE. Make particular note of the fact that it allows changing passwords and granting access to high-privilege roles. Also remove the suggestion of using a user with CREAT

pgsql: Improve documentation of the CREATEROLE attibute.

2023-01-03 Thread Robert Haas
Improve documentation of the CREATEROLE attibute. In user-manag.sgml, document precisely what privileges are conveyed by CREATEROLE. Make particular note of the fact that it allows changing passwords and granting access to high-privilege roles. Also remove the suggestion of using a user with CREAT

pgsql: vacuumlazy.c: Save get_database_name() in vacrel.

2023-01-03 Thread Peter Geoghegan
vacuumlazy.c: Save get_database_name() in vacrel. This brings dbname strings in line with namespace and relation name strings. Author: Peter Geoghegan Discussion: https://postgr.es/m/cah2-wzkq1tku-ddnvngel870di3+cu1uto-7nw7xfdpve-x...@mail.gmail.com Branch -- master Details --- https:

pgsql: Delay commit status checks until freezing executes.

2023-01-03 Thread Peter Geoghegan
Delay commit status checks until freezing executes. pg_xact lookups are relatively expensive. Move the xmin/xmax commit status checks from the point that freeze plans are prepared to the point that they're actually executed. Otherwise we'll repeat many commit status checks whenever multiple succ

pgsql: Refine the definition of page-level freezing.

2023-01-03 Thread Peter Geoghegan
Refine the definition of page-level freezing. Improve comments added by commit 1de58df4 which describe the lazy_scan_prune "freeze the page" path. These newly revised comments are based on suggestions from Jeff Davis. In passing, remove nearby visibility_cutoff_xid comments left over from commit

pgsql: Windows support in pg_import_system_collations

2023-01-03 Thread Peter Eisentraut
Windows support in pg_import_system_collations Windows can enumerate the locales that are either installed or supported by calling EnumSystemLocalesEx(), similar to what is already done in the READ_LOCALE_A_OUTPUT switch. We can refactor some of the logic already used in that switch into a new fu