pgsql: doc PG 18 relnotes: Remove item about PQservice()

2025-07-08 Thread Michael Paquier
doc PG 18 relnotes: Remove item about PQservice() This libpq API has been removed in fc3edb52fbb9, commit that has forgotten one reference in the release notes. This applies only to v18. Branch -- REL_18_STABLE Details --- https://git.postgresql.org/pg/commitdiff/601a3133ae72ab24b27c96a

pgsql: libpq: Remove PQservice()

2025-07-08 Thread Michael Paquier
libpq: Remove PQservice() This routine has been introduced as a shortcut to be able to retrieve a service name from an active connection, for psql. Per discussion, and as it is only used by psql, let's remove it to not clutter the libpq API more than necessary. The logic in psql is replaced by l

pgsql: libpq: Remove PQservice()

2025-07-08 Thread Michael Paquier
libpq: Remove PQservice() This routine has been introduced as a shortcut to be able to retrieve a service name from an active connection, for psql. Per discussion, and as it is only used by psql, let's remove it to not clutter the libpq API more than necessary. The logic in psql is replaced by l

pgsql: Doc: Improve logical replication failover documentation.

2025-07-08 Thread Amit Kapila
Doc: Improve logical replication failover documentation. Clarified that the failover steps apply to a specific PostgreSQL subscriber and added guidance for verifying replication slot synchronization during planned failover. Additionally, corrected the standby query to avoid false positives by chec

pgsql: Doc: Improve logical replication failover documentation.

2025-07-08 Thread Amit Kapila
Doc: Improve logical replication failover documentation. Clarified that the failover steps apply to a specific PostgreSQL subscriber and added guidance for verifying replication slot synchronization during planned failover. Additionally, corrected the standby query to avoid false positives by chec

pgsql: Doc: Improve logical replication failover documentation.

2025-07-08 Thread Amit Kapila
Doc: Improve logical replication failover documentation. Clarified that the failover steps apply to a specific PostgreSQL subscriber and added guidance for verifying replication slot synchronization during planned failover. Additionally, corrected the standby query to avoid false positives by chec

Re: pgsql: Fix up misuse of "volatile" in contrib/xml2.

2025-07-08 Thread Michael Paquier
On Tue, Jul 08, 2025 at 09:00:39PM +, Tom Lane wrote: > Fix up misuse of "volatile" in contrib/xml2. > > Also fix a number of places where variables that are assigned to > within a PG_TRY and then used after it were not initialized or > not marked as volatile. (A few buildfarm members were is

pgsql: libpq: Add TAP test for nested service file

2025-07-08 Thread Michael Paquier
libpq: Add TAP test for nested service file This test corresponds to the case of a "service" defined in a service file, that libpq is not able to support in parseServiceFile(). This has come up during the review of a patch to add more features in this area, useful on its own. Piece extracted fro

pgsql: Change pg_test_timing to measure in nanoseconds not microseconds

2025-07-08 Thread Tom Lane
Change pg_test_timing to measure in nanoseconds not microseconds. Most of our platforms have better-than-microsecond timing resolution, so the original definition of this program is getting less and less useful. Make it report nanoseconds not microseconds. Also, add a second output table that re

pgsql: Fix a couple more places in docs for pg_lsn change

2025-07-08 Thread Álvaro Herrera
Fix a couple more places in docs for pg_lsn change Also, revert Unicode linestyle to ASCII. Reported-by: Japin Li Discussion: https://postgr.es/m/me0p300mb04453a39931f95805c4205a8b6...@me0p300mb0445.ausp300.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/co

pgsql: Fix low-probability memory leak in XMLSERIALIZE(... INDENT).

2025-07-08 Thread Tom Lane
Fix low-probability memory leak in XMLSERIALIZE(... INDENT). xmltotext_with_options() did not consider the possibility that pg_xml_init() could fail --- most likely due to OOM. If that happened, the already-parsed xmlDoc structure would be leaked. Oversight in commit 483bdb2af. Bug: #18981 Autho

pgsql: Fix low-probability memory leak in XMLSERIALIZE(... INDENT).

2025-07-08 Thread Tom Lane
Fix low-probability memory leak in XMLSERIALIZE(... INDENT). xmltotext_with_options() did not consider the possibility that pg_xml_init() could fail --- most likely due to OOM. If that happened, the already-parsed xmlDoc structure would be leaked. Oversight in commit 483bdb2af. Bug: #18981 Autho

pgsql: Fix low-probability memory leak in XMLSERIALIZE(... INDENT).

2025-07-08 Thread Tom Lane
Fix low-probability memory leak in XMLSERIALIZE(... INDENT). xmltotext_with_options() did not consider the possibility that pg_xml_init() could fail --- most likely due to OOM. If that happened, the already-parsed xmlDoc structure would be leaked. Oversight in commit 483bdb2af. Bug: #18981 Autho

pgsql: Fix low-probability memory leak in XMLSERIALIZE(... INDENT).

2025-07-08 Thread Tom Lane
Fix low-probability memory leak in XMLSERIALIZE(... INDENT). xmltotext_with_options() did not consider the possibility that pg_xml_init() could fail --- most likely due to OOM. If that happened, the already-parsed xmlDoc structure would be leaked. Oversight in commit 483bdb2af. Bug: #18981 Autho

pgsql: Fix up misuse of "volatile" in contrib/xml2.

2025-07-08 Thread Tom Lane
Fix up misuse of "volatile" in contrib/xml2. What we want in these places is "xmlChar *volatile ptr", not "volatile xmlChar *ptr". The former means that the pointer variable itself needs to be treated as volatile, while the latter says that what it points to is volatile. Since the point here is t