pgsql: Allow dbname to be written as part of connstring via pg_baseback

2024-03-20 Thread Amit Kapila
Allow dbname to be written as part of connstring via pg_basebackup's -R option. Commit cca97ce6a665 allowed dbname in pg_basebackup connstring and in this commit we allow it to be written in postgresql.auto.conf when -R option is used. The database name in the connection string will be used by

pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl

2024-03-20 Thread Masahiko Sawada
Add TIDStore, to store sets of TIDs (ItemPointerData) efficiently. TIDStore is a data structure designed to efficiently store large sets of TIDs. For TID storage, it employs a radix tree, where the key is a block number, and the value is a bitmap representing offset numbers. The TIDStore can be

pgsql: Un-break genbki.pl's error reporting capabilities.

2024-03-20 Thread Tom Lane
Un-break genbki.pl's error reporting capabilities. This essentially reverts commit 69eb643b2, which added a fast path in Catalog::ParseData, but neglected to preserve the behavior of adding a line_number field in each hash. That makes it impossible for genbki.pl to provide any localization of

pgsql: Add to_regtypemod function to extract typemod from a string type

2024-03-20 Thread Tom Lane
Add to_regtypemod function to extract typemod from a string type name. In combination with to_regtype, this allows converting a string to the "canonicalized" form emitted by format_type. That usage requires parsing the string twice, which is slightly annoying but not really too expensive. We

pgsql: Avoid overflow in MaybeRemoveOldWalSummaries().

2024-03-20 Thread Nathan Bossart
Avoid overflow in MaybeRemoveOldWalSummaries(). This commit limits the maximum value of wal_summary_keep_time to INT_MAX / SECS_PER_MINUTE to avoid overflow when it is converted to seconds. In passing, use the HOURS_PER_DAY, MINS_PER_HOUR, and SECS_PER_MINUTE macros in the code for this GUC

pgsql: Inline basic UTF-8 functions.

2024-03-20 Thread Jeff Davis
Inline basic UTF-8 functions. Shows a measurable speedup when processing UTF-8 data, such as with the new builtin collation provider. Discussion: https://postgr.es/m/163f4e2190cdf67f67016044e503c5004547e5a9.ca...@j-davis.com Reviewed-by: Peter Eisentraut Branch -- master Details ---

pgsql: Revert "Temporary patch to help debug pg_walsummary test failure

2024-03-20 Thread Nathan Bossart
Revert "Temporary patch to help debug pg_walsummary test failures." Thanks to commits ea18eb7d62, b6ee30ec08, and 19a829a327, the 002_blocks.pl test now consistently passes, so we can remove this temporary debugging code. This reverts commit 5ddf9973477729cf161b4ad0a1efd52f4fea9c88. Discussion:

pgsql: Review wording on tablespaces w.r.t. partitioned tables

2024-03-20 Thread Alvaro Herrera
Review wording on tablespaces w.r.t. partitioned tables Remove a redundant comment, and document pg_class.reltablespace properly in catalogs.sgml. After commits a36c84c3e4a9, 87259588d0ab and others. Backpatch to 12. Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql

pgsql: Review wording on tablespaces w.r.t. partitioned tables

2024-03-20 Thread Alvaro Herrera
Review wording on tablespaces w.r.t. partitioned tables Remove a redundant comment, and document pg_class.reltablespace properly in catalogs.sgml. After commits a36c84c3e4a9, 87259588d0ab and others. Backpatch to 12. Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql

pgsql: Review wording on tablespaces w.r.t. partitioned tables

2024-03-20 Thread Alvaro Herrera
Review wording on tablespaces w.r.t. partitioned tables Remove a redundant comment, and document pg_class.reltablespace properly in catalogs.sgml. After commits a36c84c3e4a9, 87259588d0ab and others. Backpatch to 12. Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql

pgsql: Review wording on tablespaces w.r.t. partitioned tables

2024-03-20 Thread Alvaro Herrera
Review wording on tablespaces w.r.t. partitioned tables Remove a redundant comment, and document pg_class.reltablespace properly in catalogs.sgml. After commits a36c84c3e4a9, 87259588d0ab and others. Backpatch to 12. Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql

pgsql: Review wording on tablespaces w.r.t. partitioned tables

2024-03-20 Thread Alvaro Herrera
Review wording on tablespaces w.r.t. partitioned tables Remove a redundant comment, and document pg_class.reltablespace properly in catalogs.sgml. After commits a36c84c3e4a9, 87259588d0ab and others. Backpatch to 12. Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql

pgsql: Review wording on tablespaces w.r.t. partitioned tables

2024-03-20 Thread Alvaro Herrera
Review wording on tablespaces w.r.t. partitioned tables Remove a redundant comment, and document pg_class.reltablespace properly in catalogs.sgml. After commits a36c84c3e4a9, 87259588d0ab and others. Backpatch to 12. Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql

pgsql: Rework lwlocknames.txt to become lwlocklist.h

2024-03-20 Thread Alvaro Herrera
Rework lwlocknames.txt to become lwlocklist.h This way, we can fold the list of lock names to occur in BuiltinTrancheNames instead of having its own separate array. This saves two lines of code in GetLWTrancheName and some space in BuiltinTrancheNames, as foreseen in commit 74a730631065, as well

pgsql: Catalog domain not-null constraints

2024-03-20 Thread Peter Eisentraut
Catalog domain not-null constraints This applies the explicit catalog representation of not-null constraints introduced by b0e96f3119 for table constraints also to domain not-null constraints. Reviewed-by: Aleksander Alekseev Reviewed-by: jian he Discussion:

pgsql: Reorganize heap_page_prune() function comment

2024-03-20 Thread Heikki Linnakangas
Reorganize heap_page_prune() function comment heap_page_prune()'s function header comment didn't explain the parameters in the same order they appear in the function. Fix that. Author: Melanie Plageman Discussion: https://www.postgresql.org/message-id/20240320013602.6sypr4cx6sefpemg@liskov

pgsql: Remove unused PruneState member rel

2024-03-20 Thread Heikki Linnakangas
Remove unused PruneState member rel PruneState->rel is no longer being used, so just remove it. Author: Melanie Plageman Discussion: https://www.postgresql.org/message-id/20240320013602.6sypr4cx6sefpemg@liskov Branch -- master Details ---

pgsql: Add "--exclude-extension" to pg_dump's options.

2024-03-20 Thread Dean Rasheed
Add "--exclude-extension" to pg_dump's options. This option (or equivalently specifying "exclude extension pattern" in a filter file) allows extensions matching the specified pattern to be excluded from the dump. Ayush Vatsa, reviewed by Junwang Zhao, Dean Rasheed, and Daniel Gustafsson.

pgsql: Remove assertions that some compiler say are tautological

2024-03-20 Thread Heikki Linnakangas
Remove assertions that some compiler say are tautological To avoid the compiler warnings: launch_backend.c:211:39: warning: comparison of constant 16 with expression of type 'BackendType' (aka 'enum BackendType') is always true [-Wtautological-constant-out-of-range-compare]

pgsql: Add tests for domain-related information schema views

2024-03-20 Thread Peter Eisentraut
Add tests for domain-related information schema views Reviewed-by: Aleksander Alekseev Discussion: https://www.postgresql.org/message-id/flat/9ec24d7b-633d-463a-84c6-7acff769c9e8%40eisentraut.org Branch -- master Details ---