pgsql: Replace internal C function pg_hypot() by standard hypot()

2025-11-25 Thread Peter Eisentraut
Replace internal C function pg_hypot() by standard hypot() The code comment said, "It is expected that this routine will eventually be replaced with the C99 hypot() function.", so let's do that now. This function is tested via the geometry regression test, so if it is faulty on any platform, it w

pgsql: oauth_validator: Shorten JSON responses in test logs

2025-11-25 Thread Jacob Champion
oauth_validator: Shorten JSON responses in test logs Response padding from the oauth_validator abuse tests was adding a couple megabytes to the test logs. We don't need the buildfarm to hold onto that, and we don't need to read it when debugging; truncate it. Reported-by: Álvaro Herrera Discussi

pgsql: oauth_validator: Shorten JSON responses in test logs

2025-11-25 Thread Jacob Champion
oauth_validator: Shorten JSON responses in test logs Response padding from the oauth_validator abuse tests was adding a couple megabytes to the test logs. We don't need the buildfarm to hold onto that, and we don't need to read it when debugging; truncate it. Reported-by: Álvaro Herrera Discussi

pgsql: Fix test failure caused by commit 76b78721ca.

2025-11-25 Thread Amit Kapila
Fix test failure caused by commit 76b78721ca. The test failed because it assumed that a newly created logical replication slot could be synced to the standby by the slotsync worker. However, the presence of an existing physical slot caused the new logical slot to use a non-latest xmin. On the stan

pgsql: Add input function for data type pg_dependencies

2025-11-25 Thread Michael Paquier
Add input function for data type pg_dependencies pg_dependencies is used as data type for the contents of dependencies extended statistics. This new input function consumes the format that has been established by e76defbcf09e for the output function of pg_dependencies, enforcing some sanity check

pgsql: Add input function for data type pg_ndistinct

2025-11-25 Thread Michael Paquier
Add input function for data type pg_ndistinct pg_ndistinct is used as data type for the contents of ndistinct extended statistics. This new input function consumes the format that has been established by 1f927cce4498 for the output function of pg_ndistinct, enforcing some sanity checks for: - Che

pgsql: Assert that cutoffs are provided if freezing will be attempted

2025-11-25 Thread Melanie Plageman
Assert that cutoffs are provided if freezing will be attempted heap_page_prune_and_freeze() requires the caller to initialize PruneFreezeParams->cutoffs so that the function can correctly evaluate whether tuples should be frozen. This requirement previously existed only in comments and was easy to

pgsql: Remove a useless length check.

2025-11-25 Thread Jeff Davis
Remove a useless length check. Author: Chao Li Discussion: https://postgr.es/m/CAEoWx2mW0P8CByavV58zm3=eb2mqhakocdef5b2ujyryc2c...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3b9c118920580b97d0f6f618954876227a50a14a Modified Files -

pgsql: pg_dump tests: don't put dumps in stdout

2025-11-25 Thread Álvaro Herrera
pg_dump tests: don't put dumps in stdout This bloats the regression log files for no reason. Backpatch to 18; no further only because it fails to apply cleanly. (It's just whitespace change that conflicts, but I don't think this warrants more effort than this.) Discussion: https://postgr.es/m/20

pgsql: pg_dump tests: don't put dumps in stdout

2025-11-25 Thread Álvaro Herrera
pg_dump tests: don't put dumps in stdout This bloats the regression log files for no reason. Backpatch to 18; no further only because it fails to apply cleanly. (It's just whitespace change that conflicts, but I don't think this warrants more effort than this.) Discussion: https://postgr.es/m/20

pgsql: Improve test case stability

2025-11-25 Thread Álvaro Herrera
Improve test case stability Given unlucky timing, some of the new tests added by commit bc32a12e0db2 can fail spuriously. We haven't seen such failures yet in buildfarm, but allegedly we can prevent them with this tweak. While at it, remove an unused injection point I (Álvaro) added. Author: Mi

pgsql: gen_guc_tables.pl: Validate required GUC fields before code gene

2025-11-25 Thread Peter Eisentraut
gen_guc_tables.pl: Validate required GUC fields before code generation Previously, gen_guc_tables.pl would emit "Use of uninitialized value" warnings if required fields were missing in guc_parameters.dat (for example, when an integer or real GUC omitted the 'max' value). The resulting error messa

pgsql: backend/nodes cleanup: Move loop variables definitions into for

2025-11-25 Thread Peter Eisentraut
backend/nodes cleanup: Move loop variables definitions into for statement Author: Chao Li (Evan) Discussion: https://www.postgresql.org/message-id/flat/CAEoWx2nP12qwAaiJutbn1Kw50atN6FbMJNQ4bh4%2BfP_Ay_u7Eg%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/comm

Re: pgsql: Add slotsync skip statistics.

2025-11-25 Thread Amit Kapila
On Tue, Nov 25, 2025 at 1:07 PM Amit Kapila wrote: > > Add slotsync skip statistics. > The test added by this commit caused two BF failures as reported in email [1]. The analysis and patch to fix the problem is also proposed in a later email [2]. This is a test-only issue causing random failures.

pgsql: Fix a BF failure caused by commit 76b78721ca.

2025-11-25 Thread Amit Kapila
Fix a BF failure caused by commit 76b78721ca. The issue occurred because the replication slot was not released in the slotsync worker when a slot synchronization cycle was skipped. This skip happened because the required WAL was not received and flushed on the standby server. As a result, in the n