pgsql: Unify some error messages to ease work of translators

2024-09-03 Thread Michael Paquier
Unify some error messages to ease work of translators This commit updates a couple of error messages around control file data, GUCs and server settings, unifying to the same message where possible. This reduces the translation burden a bit. Author: Peter Smith Discussion: https://postgr.es/m/cah

pgsql: Apply more quoting to GUC names in messages

2024-09-03 Thread Michael Paquier
Apply more quoting to GUC names in messages This is a continuation of 17974ec25946. More quotes are applied to GUC names in error messages and hints, taking care of what seems to be all the remaining holes currently in the tree for the GUCs. Author: Peter Smith Discussion: https://postgr.es/m/c

pgsql: Collect statistics about conflicts in logical replication.

2024-09-03 Thread Amit Kapila
Collect statistics about conflicts in logical replication. This commit adds columns in view pg_stat_subscription_stats to show the number of times a particular conflict type has occurred during the application of logical replication changes. The following columns are added: confl_insert_exists:

pgsql: Avoid unnecessary post-sort projection

2024-09-03 Thread Richard Guo
Avoid unnecessary post-sort projection When generating paths for the ORDER BY clause, one thing we need to ensure is that the output paths project the correct final_target. To achieve this, in create_ordered_paths, we compare the pathtarget of each generated path with the given 'target', and add

pgsql: Check the validity of commutators for merge/hash clauses

2024-09-03 Thread Richard Guo
Check the validity of commutators for merge/hash clauses When creating merge or hash join plans in createplan.c, the merge or hash clauses may need to get commuted to ensure that the outer var is on the left and the inner var is on the right if they are not already in the expected form. This requ

pgsql: Fix inconsistent LWLock tranche name "CommitTsSLRU"

2024-09-03 Thread Michael Paquier
Fix inconsistent LWLock tranche name "CommitTsSLRU" This term was using an inconsistent casing between the code and the documentation, using "CommitTsSLRU" in wait_event_names.txt and "CommitTSSLRU" in the code. Let's update the term in the code to reflect what's in the documentation, "CommitTs"

pgsql: Fix inconsistent LWLock tranche name "CommitTsSLRU"

2024-09-03 Thread Michael Paquier
Fix inconsistent LWLock tranche name "CommitTsSLRU" This term was using an inconsistent casing between the code and the documentation, using "CommitTsSLRU" in wait_event_names.txt and "CommitTSSLRU" in the code. Let's update the term in the code to reflect what's in the documentation, "CommitTs"

pgsql: Avoid installcheck failure in TAP tests using injection_points

2024-09-03 Thread Michael Paquier
Avoid installcheck failure in TAP tests using injection_points These tests depend on the test module injection_points to be installed, but it may not be available as the contents of src/test/modules/ are not installed by default. This commit adds a workaround based on a scan of pg_available_exten

pgsql: Avoid installcheck failure in TAP tests using injection_points

2024-09-03 Thread Michael Paquier
Avoid installcheck failure in TAP tests using injection_points These tests depend on the test module injection_points to be installed, but it may not be available as the contents of src/test/modules/ are not installed by default. This commit adds a workaround based on a scan of pg_available_exten

pgsql: Remember last collation to speed up collation cache.

2024-09-03 Thread Jeff Davis
Remember last collation to speed up collation cache. This optimization is to avoid a performance regression in an upcoming patch that will remove lc_collate_is_c(). Discussion: https://postgr.es/m/96a559be83329bc66074a3925ebcfa8ceb16dfc5.ca...@j-davis.com Discussion: https://postgr.es/m/646f662

pgsql: Simplify makefiles exporting twice enable_injection_points

2024-09-03 Thread Michael Paquier
Simplify makefiles exporting twice enable_injection_points This is confusing, as it exports twice the same variable. Oversight in 6782709df81f that has spread in more places afterwards. Reported-by: Alvaro Herrera, Tom Lane Discussion: https://postgr.es/m/202408201630.mn6vbohjh7hh@alvherre.pgsql

pgsql: Simplify makefiles exporting twice enable_injection_points

2024-09-03 Thread Michael Paquier
Simplify makefiles exporting twice enable_injection_points This is confusing, as it exports twice the same variable. Oversight in 6782709df81f that has spread in more places afterwards. Reported-by: Alvaro Herrera, Tom Lane Discussion: https://postgr.es/m/202408201630.mn6vbohjh7hh@alvherre.pgsql

pgsql: Standardize "read-ahead advice" terminology.

2024-09-03 Thread Thomas Munro
Standardize "read-ahead advice" terminology. Commit 6654bb920 added macOS's equivalent of POSIX_FADV_WILLNEED, and changed some explicit references to posix_fadvise to use this more general name for the concept. Update some remaining references. Reviewed-by: Peter Eisentraut Discussion: https:

pgsql: Tag refs/tags/REL_17_RC1 was created

2024-09-03 Thread noreply
Tag refs/tags/REL_17_RC1 was created.

pgsql: Fix stack variable scope from previous commit.

2024-09-03 Thread Noah Misch
Fix stack variable scope from previous commit. The defect came from me, not from that commit's credited author. Per buildfarm members olingo and grassquit. Discussion: https://postgr.es/m/20240903192030...@rfd.leadboat.com Branch -- master Details --- https://git.postgresql.org/pg/comm

pgsql: Add block_range_read_stream_cb(), to deduplicate code.

2024-09-03 Thread Noah Misch
Add block_range_read_stream_cb(), to deduplicate code. This replaces two functions for iterating over all blocks in a range. A pending patch will use this instead of adding a third. Nazir Bilal Yavuz Discussion: https://postgr.es/m/20240820184742.f2.nmi...@google.com Branch -- master Deta

pgsql: Optimize pg_visibility with read streams.

2024-09-03 Thread Noah Misch
Optimize pg_visibility with read streams. We've measured 5% performance improvement, and this arranges to benefit automatically from future optimizations to the read_stream subsystem. Nazir Bilal Yavuz Discussion: https://postgr.es/m/can55fz1_ru3xpmgtwsu67fth2fs_frrromb7x6zs+f44qbe...@mail.gmai

pgsql: Use library functions to edit config in SSL tests

2024-09-03 Thread Daniel Gustafsson
Use library functions to edit config in SSL tests The SSL tests were editing the postgres configuration by directly reading and writing the files rather than using append_conf() from the testcode library. Reviewed-by: Peter Eisentraut Discussion: https://postgr.es/m/01f4684c-8c98-4bbe-ab83-ac8d7

pgsql: Test for PG_TEST_EXTRA separately in SSL tests

2024-09-03 Thread Daniel Gustafsson
Test for PG_TEST_EXTRA separately in SSL tests PG_TEST_EXTRA is an override and should be tested for separately from any other test as there is no dependency on whether OpenSSL is available or not. Reviewed-by: Peter Eisentraut Discussion: https://postgr.es/m/01f4684c-8c98-4bbe-ab83-ac8d7c746...

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-09-03 Thread Alexander Korotkov
On Tue, Sep 3, 2024 at 4:07 PM Alexander Korotkov wrote: > If no objections, I will push the patch moving code then go ahead > writing the two patches above. The patch for code movement missed couple of includes. Revised version is attached. -- Regards, Alexander Korotkov Supabase v2-0001

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-09-03 Thread Alexander Korotkov
Hi, Michael! On Mon, Sep 2, 2024 at 3:25 AM Michael Paquier wrote: > > On Mon, Sep 02, 2024 at 02:55:50AM +0300, Alexander Korotkov wrote: > > Could you, please, check the attached patch? > > The patch moving the code looks correct at quick glance. Thank you for your feedback. > Now, I've been

Re: pgsql: Remove support for OpenSSL older than 1.1.0

2024-09-03 Thread Daniel Gustafsson
> On 3 Sep 2024, at 12:36, Robins Tharakan wrote: > I am trying to update my buildfarm animals for this, and although I fixed > massasauga (essentially by skipping the test for now), I am unclear why > snakefly still fails (now, much later into the cycle). > > Could you point me on how to fix

Re: pgsql: Remove support for OpenSSL older than 1.1.0

2024-09-03 Thread Robins Tharakan
Hi Daniel, On Mon, 2 Sept 2024 at 21:54, Daniel Gustafsson wrote: > > Remove support for OpenSSL older than 1.1.0 > I am trying to update my buildfarm animals for this, and although I fixed massasauga (essentially by skipping the test for now), I am unclear why snakefly still fails (now, much la

pgsql: Fix typos in code comments and test data

2024-09-03 Thread Daniel Gustafsson
Fix typos in code comments and test data The typos in 005_negotiate_encryption.pl and pg_combinebackup.c shall be backported to v17 where they were introduced. Backpatch-through: v17 Discussion: https://postgr.es/m/ztaj7bkn4658o...@paquier.xyz Branch -- master Details --- https://git.po