pgsql: Fixed misspelled byteswap function for big endian machines

2024-01-18 Thread John Naylor
Fixed misspelled byteswap function for big endian machines Per members lora and mamba Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dd0a0cfc81fecacf2aed41b9eb138f850e43aab6 Modified Files -- src/include/common/hashfn_unstable.h | 2 +- 1 file changed,

pgsql: Add optimized C string hashing

2024-01-18 Thread John Naylor
Add optimized C string hashing Given an already-initialized hash state and a NUL-terminated string, accumulate the hash of the string into the hash state and return the length for the caller to (optionally) save for the finalizer. This avoids a strlen call. If the string pointer is aligned, we

pgsql: Add inline incremental hash functions for in-memory use

2024-01-18 Thread John Naylor
Add inline incremental hash functions for in-memory use It can be useful for a hash function to expose separate initialization, accumulation, and finalization steps. In particular, this is useful for building inline hash functions for simplehash. Instead of trying to whack around hash_bytes

pgsql: psql: Add ignore_slash_options in bind's inactive branch

2024-01-18 Thread Michael Paquier
psql: Add ignore_slash_options in bind's inactive branch All commands accepting arguments, handling them with OT_NORMAL, OT_SQLID or OT_SQLIDHACK, should call ignore_slash_options() in inactive branch to scan and discard extra arguments. All the backslash commands that handle arguments do so,

pgsql: Fix incorrect placeholder in walreceiver.c

2024-01-18 Thread Michael Paquier
Fix incorrect placeholder in walreceiver.c Author: Yongtao Huang Discussion: https://postgr.es/m/caoe1go3h7cgrsceo+hbhnoptk-mjhii-yt8d19cikkintjw...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3ada0d2cae4d9d3e045c72e3ee0b37ccb6e13902 Modified

pgsql: Improve some documentation about the bootstrap superuser.

2024-01-18 Thread Nathan Bossart
Improve some documentation about the bootstrap superuser. This commit adds some notes about the inability to remove superuser privileges from the bootstrap superuser. This has been blocked since commit e530be2c5c, but it wasn't intended be a supported feature before that, either. In passing,

pgsql: Fix buildfarm error from commit 5c31669058.

2024-01-18 Thread Jeff Davis
Fix buildfarm error from commit 5c31669058. Skip test when not using unix domain sockets. Discussion: https://postgr.es/m/caldanm29-8oozsbwo9h6dn_tb_3ya1qjrjput-khan8ncdj...@mail.gmail.com Backpatch-through: 16 Branch -- REL_16_STABLE Details ---

pgsql: Fix buildfarm error from commit 5c31669058.

2024-01-18 Thread Jeff Davis
Fix buildfarm error from commit 5c31669058. Skip test when not using unix domain sockets. Discussion: https://postgr.es/m/caldanm29-8oozsbwo9h6dn_tb_3ya1qjrjput-khan8ncdj...@mail.gmail.com Backpatch-through: 16 Branch -- master Details ---

pgsql: Fix broken Bitmapset optimization in DiscreteKnapsack()

2024-01-18 Thread David Rowley
Fix broken Bitmapset optimization in DiscreteKnapsack() Some code in DiscreteKnapsack() attempted to zero all words in a Bitmapset by performing bms_del_members() to delete all the members from itself before replacing those members with members from another set. When that code was written, this

pgsql: Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL comm

2024-01-18 Thread Tom Lane
Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL command. plpgsql fails on new-style CREATE FUNCTION/PROCEDURE commands within a routine or DO block, because make_execsql_stmt believes that a semicolon token always terminates a SQL command. Now, that's actually been wrong since the

pgsql: Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL comm

2024-01-18 Thread Tom Lane
Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL command. plpgsql fails on new-style CREATE FUNCTION/PROCEDURE commands within a routine or DO block, because make_execsql_stmt believes that a semicolon token always terminates a SQL command. Now, that's actually been wrong since the

pgsql: Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL comm

2024-01-18 Thread Tom Lane
Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL command. plpgsql fails on new-style CREATE FUNCTION/PROCEDURE commands within a routine or DO block, because make_execsql_stmt believes that a semicolon token always terminates a SQL command. Now, that's actually been wrong since the

pgsql: Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL comm

2024-01-18 Thread Tom Lane
Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL command. plpgsql fails on new-style CREATE FUNCTION/PROCEDURE commands within a routine or DO block, because make_execsql_stmt believes that a semicolon token always terminates a SQL command. Now, that's actually been wrong since the

pgsql: Remove LVPagePruneState.

2024-01-18 Thread Robert Haas
Remove LVPagePruneState. Commit cb970240f13df2b63f0410f81f452179a2b78d6f moved some code from lazy_scan_heap() to lazy_scan_prune(), and now some things that used to need to be passed back and forth are completely local to lazy_scan_prune(). Hence, this struct is mostly obsolete. The only thing

pgsql: Move VM update code from lazy_scan_heap() to lazy_scan_prune().

2024-01-18 Thread Robert Haas
Move VM update code from lazy_scan_heap() to lazy_scan_prune(). Most of the output parameters of lazy_scan_prune() were being used to update the VM in lazy_scan_heap(). Moving that code into lazy_scan_prune() simplifies lazy_scan_heap() and requires less communication between the two. This

pgsql: Clarify language in incremental backup glossary entry.

2024-01-18 Thread Robert Haas
Clarify language in incremental backup glossary entry. These changes were intended to be included in commit 7b1dbf0a8d1d4e1e6d01a76dc45a3216e8a16d94, but I goofed. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0a157a4d441586a0e590e2f8a3839114e01df4b7 Modified

pgsql: Optimize vacuuming of relations with no indexes.

2024-01-18 Thread Robert Haas
Optimize vacuuming of relations with no indexes. If there are no indexes on a relation, items can be marked LP_UNUSED instead of LP_DEAD when pruning. This significantly reduces WAL volume, since we no longer need to emit one WAL record for pruning and a second to change the LP_DEAD line pointers

pgsql: More documentation updates for incremental backup.

2024-01-18 Thread Robert Haas
More documentation updates for incremental backup. Add new terms to glossary. Add a reference to walsummarizer to monitoring.sgml. Matthias van de Meent and Robert Haas Discussion: http://postgr.es/m/caeze2wjhdvcqee_qqeok3na6dwudogsbjaxzmydaqiaah1u...@mail.gmail.com Branch -- master

pgsql: Rework text in replication slots documentation

2024-01-18 Thread Alvaro Herrera
Rework text in replication slots documentation This is cosmetic, so no backpatch. Reviewed-by: Bharath Rupireddy Discussion: https://postgr.es/m/20230413111838.e7yxke2dtwrxw3qy@alvherre.pgsql Discussion: https://postgr.es/m/202401151537.ryhysqfncs6d@alvherre.pgsql Branch -- master Details

pgsql: Error message capitalisation

2024-01-18 Thread Peter Eisentraut
Error message capitalisation per style guidelines Author: Peter Smith Discussion: https://www.postgresql.org/message-id/flat/CAHut%2BPtzstExQ4%3DvFH%2BWzZ4g4xEx2JA%3DqxussxOdxVEwJce6bw%40mail.gmail.com Branch -- master Details ---