pgsql: Rename SLRU elements in view pg_stat_slru

2024-02-28 Thread Alvaro Herrera
Rename SLRU elements in view pg_stat_slru The new names are intended to match those in an upcoming patch that adds a few GUCs to configure the SLRU buffer sizes. Backwards compatibility concern: this changes the accepted names for function pg_stat_slru_rest(). Since this function recognizes "any

pgsql: Remove AIX support

2024-02-28 Thread Heikki Linnakangas
Remove AIX support There isn't a lot of user demand for AIX support, we have a bunch of hacks to work around AIX-specific compiler bugs and idiosyncrasies, and no one has stepped up to the plate to properly maintain it. Remove support for AIX to get rid of that maintenance overhead. It's still sup

pgsql: Run autoconf, for update of a comment.

2024-02-28 Thread Heikki Linnakangas
Run autoconf, for update of a comment. I forgot to run autoconf in commit 0b16bb8776, after some last minute comment changes. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/802d886054ff948022a93bae324eae66276623cc Modified Files -- configure | 2 +- 1 f

pgsql: Remove configure --with-CC option

2024-02-28 Thread Heikki Linnakangas
Remove configure --with-CC option It's been deprecated since commit cb292206c5 from July 2000. Discussion: https://www.postgresql.org/message-id/a2a0f5d8-2d80-48e5-b8f7-0a0a6018c...@iki.fi Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1c1eec0f2d88b7e823af959103b

pgsql: Improve performance of subsystems on top of SLRU

2024-02-28 Thread Alvaro Herrera
Improve performance of subsystems on top of SLRU More precisely, what we do here is make the SLRU cache sizes configurable with new GUCs, so that sites with high concurrency and big ranges of transactions in flight (resp. multixacts/subtransactions) can benefit from bigger caches. In order for th

pgsql: Fix mis-rounding and overflow hazards in date_bin().

2024-02-28 Thread Tom Lane
Fix mis-rounding and overflow hazards in date_bin(). In the case where the target timestamp is before the origin timestamp and their difference is already an exact multiple of the stride, the code incorrectly subtracted the stride anyway. Also detect several integer-overflow cases that previously

pgsql: Fix mis-rounding and overflow hazards in date_bin().

2024-02-28 Thread Tom Lane
Fix mis-rounding and overflow hazards in date_bin(). In the case where the target timestamp is before the origin timestamp and their difference is already an exact multiple of the stride, the code incorrectly subtracted the stride anyway. Also detect several integer-overflow cases that previously

pgsql: Fix mis-rounding and overflow hazards in date_bin().

2024-02-28 Thread Tom Lane
Fix mis-rounding and overflow hazards in date_bin(). In the case where the target timestamp is before the origin timestamp and their difference is already an exact multiple of the stride, the code incorrectly subtracted the stride anyway. Also detect several integer-overflow cases that previously

pgsql: Fix mis-rounding and overflow hazards in date_bin().

2024-02-28 Thread Tom Lane
Fix mis-rounding and overflow hazards in date_bin(). In the case where the target timestamp is before the origin timestamp and their difference is already an exact multiple of the stride, the code incorrectly subtracted the stride anyway. Also detect several integer-overflow cases that previously

pgsql: Mop-up for AIX-ectomy: remove now-dead test code.

2024-02-28 Thread Tom Lane
Mop-up for AIX-ectomy: remove now-dead test code. Commit 0b16bb877 removed the test query added by commit 79b716cfb, but not the C-language support function used by that query. I don't see any plausible reason why we'd need that function again, so throw it overboard too. Branch -- master De

pgsql: Convert README to Markdown.

2024-02-28 Thread Nathan Bossart
Convert README to Markdown. This is a first step toward modernizing our README file. Some popular developer platforms support rendering README.md files, so a direct conversion to Markdown seems like a good place to start. The intent is to keep this file legible as plain text even as it accumulate

pgsql: Improve plpgsql's error messages for incorrect %TYPE and %ROWTYP

2024-02-28 Thread Tom Lane
Improve plpgsql's error messages for incorrect %TYPE and %ROWTYPE. If one of these constructs referenced a nonexistent object, we'd fall through to feeding the whole construct to the core parser, which would reject it with a "syntax error" message. That's pretty unhelpful and misleading. There's

pgsql: Fix documentation comments for test CA config files

2024-02-28 Thread Daniel Gustafsson
Fix documentation comments for test CA config files The config files which are used to generate the server and client CAs claimed that these were self-signed, when they in reality are signed by the root_ca (which however is self-signed). Reword the comments to match. Author: David Zhang Discuss

Re: pgsql: Mop-up for AIX-ectomy: remove now-dead test code.

2024-02-28 Thread Michael Paquier
On Wed, Feb 28, 2024 at 07:34:25PM +, Tom Lane wrote: > Mop-up for AIX-ectomy: remove now-dead test code. > > Commit 0b16bb877 removed the test query added by commit 79b716cfb, > but not the C-language support function used by that query. I don't > see any plausible reason why we'd need that

Re: pgsql: Mop-up for AIX-ectomy: remove now-dead test code.

2024-02-28 Thread Tom Lane
Michael Paquier writes: > crake is complaining in some upgrade paths: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2024-02-28%2021%3A27%3A04 Yeah, I'm on it... regards, tom lane

pgsql: Fix cross-version upgrade tests after f0827b443.

2024-02-28 Thread Tom Lane
Fix cross-version upgrade tests after f0827b443. Removing the get_columns_length() function from regress.so means we have to drop it when testing upgrades from versions that had it. Per buildfarm. Discussion: https://postgr.es/m/2520881.1709159...@sss.pgh.pa.us Branch -- master Details ---

pgsql: Use C99-designated initializer syntax for arrays related to enco

2024-02-28 Thread Michael Paquier
Use C99-designated initializer syntax for arrays related to encodings This updates the following lookup arrays to use C99-designated initializer syntax, indexed based on the enum pg_enc: pg_enc2icu_tbl[] pg_enc2name_tbl[] pg_wchar_table[] This is more readable, and removes problems with ordering

pgsql: Fixups for commit 93db6cbda0.

2024-02-28 Thread Amit Kapila
Fixups for commit 93db6cbda0. Ensure to set always-secure search path for both local and remote connections during slot synchronization, so that malicious users can't redirect user code (e.g. operators). In the passing, improve the name of define, remove spurious return statement, and a minor cha