pgsql: Deprecate MD5 passwords.

2024-12-02 Thread Nathan Bossart
Deprecate MD5 passwords. MD5 has been considered to be unsuitable for use as a cryptographic hash algorithm for some time. Furthermore, MD5 password hashes in PostgreSQL are vulnerable to pass-the-hash attacks, i.e., knowing the username and hashed password is sufficient to authenticate. The SCRA

pgsql: Fix #include order in timestamp.c.

2024-12-02 Thread Dean Rasheed
Fix #include order in timestamp.c. Oversight in 036bdcec9f. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/33152358453cc46f986483e9f82418fb8ba8eaef Modified Files -- src/backend/utils/adt/timestamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Add a planner support function for numeric generate_series().

2024-12-02 Thread Dean Rasheed
Add a planner support function for numeric generate_series(). This allows the planner to estimate the number of rows returned by generate_series(numeric, numeric[, numeric]), when the input values can be estimated at plan time. Song Jinzhou, reviewed by Dean Rasheed and David Rowley. Discussion:

pgsql: RelationTruncate() must set DELAY_CHKPT_START.

2024-12-02 Thread Thomas Munro
RelationTruncate() must set DELAY_CHKPT_START. Previously, it set only DELAY_CHKPT_COMPLETE. That was important, because it meant that if the XLOG_SMGR_TRUNCATE record preceded a XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also happen on disk before the XLOG_CHECKPOINT_ONLI

pgsql: RelationTruncate() must set DELAY_CHKPT_START.

2024-12-02 Thread Thomas Munro
RelationTruncate() must set DELAY_CHKPT_START. Previously, it set only DELAY_CHKPT_COMPLETE. That was important, because it meant that if the XLOG_SMGR_TRUNCATE record preceded a XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also happen on disk before the XLOG_CHECKPOINT_ONLI

pgsql: RelationTruncate() must set DELAY_CHKPT_START.

2024-12-02 Thread Thomas Munro
RelationTruncate() must set DELAY_CHKPT_START. Previously, it set only DELAY_CHKPT_COMPLETE. That was important, because it meant that if the XLOG_SMGR_TRUNCATE record preceded a XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also happen on disk before the XLOG_CHECKPOINT_ONLI

pgsql: RelationTruncate() must set DELAY_CHKPT_START.

2024-12-02 Thread Thomas Munro
RelationTruncate() must set DELAY_CHKPT_START. Previously, it set only DELAY_CHKPT_COMPLETE. That was important, because it meant that if the XLOG_SMGR_TRUNCATE record preceded a XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also happen on disk before the XLOG_CHECKPOINT_ONLI

pgsql: RelationTruncate() must set DELAY_CHKPT_START.

2024-12-02 Thread Thomas Munro
RelationTruncate() must set DELAY_CHKPT_START. Previously, it set only DELAY_CHKPT_COMPLETE. That was important, because it meant that if the XLOG_SMGR_TRUNCATE record preceded a XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also happen on disk before the XLOG_CHECKPOINT_ONLI

pgsql: RelationTruncate() must set DELAY_CHKPT_START.

2024-12-02 Thread Thomas Munro
RelationTruncate() must set DELAY_CHKPT_START. Previously, it set only DELAY_CHKPT_COMPLETE. That was important, because it meant that if the XLOG_SMGR_TRUNCATE record preceded a XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also happen on disk before the XLOG_CHECKPOINT_ONLI

Re: pgsql: Introduce CompactAttribute array in TupleDesc

2024-12-02 Thread Tom Lane
David Rowley writes: > I am looking at the buildfarm. It's fairly apparent that I've broken > something. I'm planning on reverting this shortly. Just a gut-level guess, but I'm wondering about something like uninitialized fields that happen to work as long as the memory was zero to start with. A

pgsql: Fix unintentional behavior change in commit e9931bfb75.

2024-12-02 Thread Jeff Davis
Fix unintentional behavior change in commit e9931bfb75. Prior to that commit, there was special case to use ASCII case mapping behavior for the libc provider with a single-byte encoding when that's the default collation. Commit e9931bfb75 mistakenly eliminated that special case; this commit restor

pgsql: doc Makefile: issue warning about chars that cannot be output

2024-12-02 Thread Bruce Momjian
doc Makefile: issue warning about chars that cannot be output A follow-up improvement to commit 641a5b7a144. Reported-by: Tatsuo Ishii, Tom Lane Discussion: https://postgr.es/m/20241126.182513.1752581942460106099.is...@postgresql.org Backpatch-through: master Branch -- master Details ---

pgsql: Rework some code handling pg_subscription data in psql and pg_du

2024-12-02 Thread Michael Paquier
Rework some code handling pg_subscription data in psql and pg_dump This commit fixes some inconsistencies found in the frontend code when dealing with subscription catalog data. The following changes are done: - pg_subscription.h gains a EXPOSE_TO_CLIENT_CODE, so as more content defined in pg_sub

pgsql: Introduce CompactAttribute array in TupleDesc

2024-12-02 Thread David Rowley
Introduce CompactAttribute array in TupleDesc The new compact_attrs array stores a few select fields from FormData_pg_attribute in a more compact way, using only 16 bytes per column instead of the 104 bytes that FormData_pg_attribute uses. Using CompactAttribute allows performance-critical operat

pgsql: doc: Clarify some terms for pg_createsubscriber

2024-12-02 Thread Michael Paquier
doc: Clarify some terms for pg_createsubscriber The last section of pg_createsubscriber used the terms "publication-name", "replication-slot-name", and "subscription-name". These terms are not defined on the page, which was confusing, and the intention is clearly to refer to the values one would g

pgsql: doc: Clarify some terms for pg_createsubscriber

2024-12-02 Thread Michael Paquier
doc: Clarify some terms for pg_createsubscriber The last section of pg_createsubscriber used the terms "publication-name", "replication-slot-name", and "subscription-name". These terms are not defined on the page, which was confusing, and the intention is clearly to refer to the values one would g

pgsql: Perform provider-specific initialization in new functions.

2024-12-02 Thread Jeff Davis
Perform provider-specific initialization in new functions. Reviewed-by: Andreas Karlsson Discussion: https://postgr.es/m/4548a168-62cd-457b-8d06-9ba7b985c...@proxel.se Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1ba0782ce90cb4261098de59b49ae5cb2326566b Modified

Re: pgsql: Introduce CompactAttribute array in TupleDesc

2024-12-02 Thread David Rowley
On Tue, 3 Dec 2024 at 16:52, David Rowley wrote: > > Introduce CompactAttribute array in TupleDesc I am looking at the buildfarm. It's fairly apparent that I've broken something. I'm planning on reverting this shortly. David

pgsql: Revert "Introduce CompactAttribute array in TupleDesc"

2024-12-02 Thread David Rowley
Revert "Introduce CompactAttribute array in TupleDesc" This reverts commit d28dff3f6cd6a7562fb2c211ac0fb74a33ffd032. Quite a large number of buildfarm members didn't like this commit and it's not yet clear why. Reverting this before too many animals turn red. Discussion: https://postgr.es/m/CA