pgsql: Preserve conflict-relevant data during logical replication.

2025-07-22 Thread Amit Kapila
Preserve conflict-relevant data during logical replication. Logical replication requires reliable conflict detection to maintain data consistency across nodes. To achieve this, we must prevent premature removal of tuples deleted by other origins and their associated commit_ts data by VACUUM, which

pgsql: Use strchr instead of strstr for single-char lookups

2025-07-22 Thread David Rowley
Use strchr instead of strstr for single-char lookups Compilers such as gcc and clang seem to perform this rewrite automatically when the lookup string is known at compile-time to contain a single character. The MSVC compiler does not seem apply the same optimization, and the code being adjusted h

pgsql: ecpg: Improve error detection around ecpg_strdup()

2025-07-22 Thread Michael Paquier
ecpg: Improve error detection around ecpg_strdup() Various code paths of the ECPG code did not check for memory allocation failures, including the specific case where ecpg_strdup() considers a NULL value given in input as a valid behavior. strdup() returning itself NULL on failure, there was no w

pgsql: Remove translation marker from libpq-be-fe-helpers.h.

2025-07-22 Thread Fujii Masao
Remove translation marker from libpq-be-fe-helpers.h. Commit 112faf1378e introduced a translation marker in libpq-be-fe-helpers.h, but this caused build failures on some platforms—such as the one reported by buildfarm member indri—due to linker issues with dblink. This is the same problem previous

pgsql: aio: Fix assertion, clarify README

2025-07-22 Thread Andres Freund
aio: Fix assertion, clarify README The assertion wouldn't have triggered for a long while yet, but this won't accidentally fail to detect the issue if/when it occurs. Author: Matthias van de Meent Discussion: https://postgr.es/m/CAEze2Wj-43JV4YufW23gm=uwr7lkj+p0ykctkhxnm1rwfc+...@mail.gmail.com

pgsql: aio: Fix assertion, clarify README

2025-07-22 Thread Andres Freund
aio: Fix assertion, clarify README The assertion wouldn't have triggered for a long while yet, but this won't accidentally fail to detect the issue if/when it occurs. Author: Matthias van de Meent Discussion: https://postgr.es/m/CAEze2Wj-43JV4YufW23gm=uwr7lkj+p0ykctkhxnm1rwfc+...@mail.gmail.com

Re: pgsql: Log remote NOTICE, WARNING, and similar messages using ereport()

2025-07-22 Thread Álvaro Herrera
On 2025-Jul-22, Andrei Lepikhov wrote: > Perhaps I'm wrong, but it seems to me that you also need to add the libintl > link to the Makefile of each module that uses the libpqsrv_notice_receiver > routine. That would amount to supporting translations of contrib modules, but there's actually a bunc

Re: pgsql: Log remote NOTICE, WARNING, and similar messages using ereport()

2025-07-22 Thread Andrei Lepikhov
On 22/7/2025 07:22, Fujii Masao wrote: Log remote NOTICE, WARNING, and similar messages using ereport(). Previously, NOTICE, WARNING, and similar messages received from remote servers over replication, postgres_fdw, or dblink connections were printed directly to stderr on the local server (e.g.,