pgsql: Fix check for memory allocation

2024-05-27 Thread Daniel Gustafsson
Fix check for memory allocation Commit 61461a300c1 accidentally checked memory allocation success using the wrong variable. Author: Ranier Vilela Reviewed-by: Jelte Fennema-Nio Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/caeudqaqqfth7xcb-+k6zekjfqbhqcxcr_w4dujtxvt6h3vz

pgsql: Refuse upgrades from pre-9.0 clusters

2024-05-17 Thread Daniel Gustafsson
Refuse upgrades from pre-9.0 clusters Commit 695b4a113ab added a dependency on retrieving oldestxid from pg_control, which only exists in 9.0 and onwards, but the check for 8.4 as the oldest version was retained. Since there has been few if any complaints of 8.4 upgrades not working, fix by

pgsql: Refuse upgrades from pre-9.0 clusters

2024-05-17 Thread Daniel Gustafsson
Refuse upgrades from pre-9.0 clusters Commit 695b4a113ab added a dependency on retrieving oldestxid from pg_control, which only exists in 9.0 and onwards, but the check for 8.4 as the oldest version was retained. Since there has been few if any complaints of 8.4 upgrades not working, fix by

pgsql: Refuse upgrades from pre-9.0 clusters

2024-05-17 Thread Daniel Gustafsson
Refuse upgrades from pre-9.0 clusters Commit 695b4a113ab added a dependency on retrieving oldestxid from pg_control, which only exists in 9.0 and onwards, but the check for 8.4 as the oldest version was retained. Since there has been few if any complaints of 8.4 upgrades not working, fix by

pgsql: Fix query result leak during binary upgrade

2024-05-15 Thread Daniel Gustafsson
Fix query result leak during binary upgrade 9a974cbcba00 moved the query in binary_upgrade_set_pg_class_oids to the outer level, but left the PQclear and query buffer destruction in the is_index conditional. 353708e1fb2d fixed the leak of the query buffer but left the PGresult leak. This moves

pgsql: Fix query result leak during binary upgrade

2024-05-15 Thread Daniel Gustafsson
Fix query result leak during binary upgrade 9a974cbcba00 moved the query in binary_upgrade_set_pg_class_oids to the outer level, but left the PQclear and query buffer destruction in the is_index conditional. 353708e1fb2d fixed the leak of the query buffer but left the PGresult leak. This moves

pgsql: Fix query result leak during binary upgrade

2024-05-15 Thread Daniel Gustafsson
Fix query result leak during binary upgrade 9a974cbcba00 moved the query in binary_upgrade_set_pg_class_oids to the outer level, but left the PQclear and query buffer destruction in the is_index conditional. 353708e1fb2d fixed the leak of the query buffer but left the PGresult leak. This moves

pgsql: Remove auth-options support from initdb

2024-05-14 Thread Daniel Gustafsson
Remove auth-options support from initdb When --auth was added to initdb in commit e7029b212755 it had support for auth options separated by space from the auth type, like: --auth pam --auth ident sameuser Passing an option to the ident auth type was removed in 01c1a12a5bb4 which left

pgsql: Fix memory leaks in error reporting with LOG level

2024-05-14 Thread Daniel Gustafsson
Fix memory leaks in error reporting with LOG level When loglevel is set to LOG, allocated strings used in the error message would leak. Fix by explicitly pfreeing them. Author: Ranier Vilela Reviewed-by: Daniel Gustafsson Reviewed-by: Michael Paquier Discussion: https://postgr.es/m

pgsql: Fix comment regarding LibreSSL availability

2024-05-05 Thread Daniel Gustafsson
Fix comment regarding LibreSSL availability SSL_AD_NO_APPLICATION_PROTOCOL is indeed available in LibreSSL, but only in 3.4.3 and later (shipped in OpenBSD 7.0). Discussion: https://postgr.es/m/e1s1g0z-000jec...@gemulon.postgresql.org Branch -- master Details ---

Re: pgsql: Fix compilation on OpenSSL 1.0.2 and LibreSSL

2024-05-03 Thread Daniel Gustafsson
> On 2 May 2024, at 12:30, Heikki Linnakangas wrote: > On 02/05/2024 13:24, Daniel Gustafsson wrote: >> This makes targeting 7.0 as the lowest LibreSSL version appealing in my >> patchset for removing support for old OpenSSL and LibreSSL versions. > > Works for me. Alth

Re: pgsql: Fix compilation on OpenSSL 1.0.2 and LibreSSL

2024-05-02 Thread Daniel Gustafsson
> On 2 May 2024, at 11:30, Heikki Linnakangas wrote: > > On 02/05/2024 12:09, Daniel Gustafsson wrote: >>> On 30 Apr 2024, at 07:26, Heikki Linnakangas >>> wrote: >>> Fix compilation on OpenSSL 1.0.2 and LibreSSL >>> >>> SSL_AD_N

Re: pgsql: Fix compilation on OpenSSL 1.0.2 and LibreSSL

2024-05-02 Thread Daniel Gustafsson
1.1.0 and later, but as of this writing not in LibreSSL. I'm a bit confused, as far as I can tell this has been in LibreSSL since the OpenBSD 6.9 release. https://github.com/openbsd/src/blob/master/lib/libssl/ssl_tlsext.c#L130 Or am I missing something? -- Daniel Gustafsson

pgsql: doc: Fix incorrectly spelled structname

2024-05-02 Thread Daniel Gustafsson
doc: Fix incorrectly spelled structname Commit 61461a300c1 accidentally misspelled the PGcancelConn struct using the PQ prefix (which admittedly is a very easy typo to make). Reported off-list. Reported-by: Alexander Lakhin Branch -- master Details ---

pgsql: Doc: fix prompt in psql crosstabview example

2024-04-24 Thread Daniel Gustafsson
Doc: fix prompt in psql crosstabview example The prompt in the crosstabview example was incorrectly indicating an open parenthesis where there is none in the example query. Fix by changing to the normal multi-line prompt. Reported-by: y.sabu...@gmail.com Discussion:

pgsql: Doc: Use past tense for things which happened in the past

2024-04-24 Thread Daniel Gustafsson
Doc: Use past tense for things which happened in the past The paragraph on SSL compression is largely describing events which took place many years ago, so reword with past tense. Reviewed-by: Peter Eisentraut Reviewed-by: Michael Paquier Discussion:

pgsql: Support disallowing SSL renegotiation when using LibreSSL

2024-04-24 Thread Daniel Gustafsson
Support disallowing SSL renegotiation when using LibreSSL LibreSSL doesn't support the SSL_OP_NO_RENEGOTIATION macro which is used by OpenSSL, instead it has invented a similar one for client- side renegotiation: SSL_OP_NO_CLIENT_RENEGOTIATION. This has been supported since LibreSSL 2.5.1 which

pgsql: Support SSL_R_VERSION_TOO_LOW when using LibreSSL

2024-04-24 Thread Daniel Gustafsson
Support SSL_R_VERSION_TOO_LOW when using LibreSSL The SSL_R_VERSION_TOO_LOW error reason is supported in LibreSSL since LibreSSL 3.6.3, shipped in OpenBSD 7.2. SSL_R_VERSION_TOO_HIGH is on the other hand not supported in any version of LibreSSL. Previously we only checked for

pgsql: Doc: Remove mention of @ and ~ GiST operators

2024-04-19 Thread Daniel Gustafsson
Doc: Remove mention of @ and ~ GiST operators These operators were removed by 2f70fdb0644c in the v14 cycle but they were accidentally left in the table of build-in operator classes. Backpatch down to v14 where the operators where removed. Author: Aleksander Alekseev Reported-by: Colin Caine

pgsql: Doc: Remove mention of @ and ~ GiST operators

2024-04-19 Thread Daniel Gustafsson
Doc: Remove mention of @ and ~ GiST operators These operators were removed by 2f70fdb0644c in the v14 cycle but they were accidentally left in the table of build-in operator classes. Backpatch down to v14 where the operators where removed. Author: Aleksander Alekseev Reported-by: Colin Caine

pgsql: Doc: Remove mention of @ and ~ GiST operators

2024-04-19 Thread Daniel Gustafsson
Doc: Remove mention of @ and ~ GiST operators These operators were removed by 2f70fdb0644c in the v14 cycle but they were accidentally left in the table of build-in operator classes. Backpatch down to v14 where the operators where removed. Author: Aleksander Alekseev Reported-by: Colin Caine

pgsql: Doc: Remove mention of @ and ~ GiST operators

2024-04-19 Thread Daniel Gustafsson
Doc: Remove mention of @ and ~ GiST operators These operators were removed by 2f70fdb0644c in the v14 cycle but they were accidentally left in the table of build-in operator classes. Backpatch down to v14 where the operators where removed. Author: Aleksander Alekseev Reported-by: Colin Caine

pgsql: Remove unused function prototype

2024-04-19 Thread Daniel Gustafsson
Remove unused function prototype Commit aafc05de1bf5 removed StartSlotSyncWorker() but mistakenly left the prototype in slotsync.h. Fix by removing. Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/3f577953-a29e-4722-98ad-2da9eff2c...@yesql.se Branch -- master Details

pgsql: Fix incorrect parameter name in prototype

2024-04-19 Thread Daniel Gustafsson
Fix incorrect parameter name in prototype The function declaration for select_next_encryption_method use the variable name have_valid_connection, so fix the prototype in the header to match that. Reported-by: Alexander Lakhin Discussion:

pgsql: Doc: Update link to the mentioned subsection

2024-04-18 Thread Daniel Gustafsson
Doc: Update link to the mentioned subsection This updates the link from pg_createsubscriber to initial data sync to actually link to the subsection in question as opposed to the main logical replication section. Author: Pavel Luzanov Discussion:

pgsql: Fix typos and duplicate words

2024-04-18 Thread Daniel Gustafsson
Fix typos and duplicate words This fixes various typos, duplicated words, and tiny bits of whitespace mainly in code comments but also in docs. Author: Daniel Gustafsson Author: Heikki Linnakangas Author: Alexander Lakhin Author: David Rowley Author: Nazir Bilal Yavuz Discussion: https

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network

pgsql: Doc: Update ulinks to RFC documents to avoid redirect

2024-04-10 Thread Daniel Gustafsson
Doc: Update ulinks to RFC documents to avoid redirect The tools.ietf.org site has been decommissioned and replaced by a number of sites serving various purposes. Links to RFCs and BCPs are now 301 redirected to their new respective IETF sites. Since this serves no purpose and only adds network

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: doc: Remove stray comma from list of psql options

2024-04-09 Thread Daniel Gustafsson
doc: Remove stray comma from list of psql options Back in 7.2 the list of options had short options and long options on the same line separated by comma, but since 7.3 they are listed separate lines. The comma on -X was left behind so fix by removing and backpatching all the way. Reported-by:

pgsql: Change debug printing to log filename

2024-04-07 Thread Daniel Gustafsson
Change debug printing to log filename When restarting the cluster fails the code introduced in 33774978c78 printed the full log contents to aid debugging. For cases when the logfile is large this adds unnecessary overhead. Reduce to printing the logfile path instead. Reported-by: Andres Freund

pgsql: Drop global objects after completed test

2024-04-03 Thread Daniel Gustafsson
Drop global objects after completed test Project policy is to not leave global objects behind after a regress test run. This was found as a result of the development of a patch to make pg_regress detect such leftovers automatically, which in the end was withdrawn due to issues with parallel

pgsql: Add error codes to some PANIC/FATAL errors reports

2024-04-03 Thread Daniel Gustafsson
Add error codes to some PANIC/FATAL errors reports This adds errcodes to a set of PANIC and FATAL errors in xlog.c and relcache.c, which previously had no errcode at all set, in order to make fleetwide analysis of errorlogs easier. There are many more ereport/elogs left which could benefit from

pgsql: Fix indentation from cafe1056558f

2024-04-03 Thread Daniel Gustafsson
Fix indentation from cafe1056558f Per buildfarm animal koel Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9301308bd196f614696e0e9492cf0c52f7857f83 Modified Files -- src/bin/psql/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: Remove superfluous trailing semicolons

2024-03-29 Thread Daniel Gustafsson
Remove superfluous trailing semicolons Two semicolons were accidentally added to rows which were already terminated semicolons. While harmless, fix by removing these. Author: Richard Guo Discussion: https://postgr.es/m/cambws4_fnj0+yogfioswzle7t6r8p6cqbuacfvezqbesfaj...@mail.gmail.com Branch

pgsql: Fix typo in comment

2024-03-25 Thread Daniel Gustafsson
Fix typo in comment Spotted while reviewing a patch changing things around this area. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b8528fe026b18976b5d5b4fcb066a8a55def3375 Modified Files -- src/interfaces/libpq/fe-cancel.c | 2 +- 1 file changed, 1

pgsql: doc: Document error handling in PGTYPESnumeric_to_long

2024-03-25 Thread Daniel Gustafsson
doc: Document error handling in PGTYPESnumeric_to_long The documentation for PGTYPESnumeric_to_long only mentioned errno being set to indicate overflow but the code also sets errno when underflow happens. Reported-by: Aidar Imamov Discussion:

pgsql: Fix indentation from a11f330b5

2024-03-25 Thread Daniel Gustafsson
Fix indentation from a11f330b5 Per buildfarm animal koel Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/64e401b62b1559d617db5c1e1070d7a05e794c27 Modified Files -- src/backend/replication/slot.c | 8 1 file changed, 4 insertions(+), 4

pgsql: ecpg: Fix return code for overflow in numeric conversion

2024-03-25 Thread Daniel Gustafsson
ecpg: Fix return code for overflow in numeric conversion The decimal conversion functions dectoint and dectolong are documented to return ECPG_INFORMIX_NUM_OVERFLOW in case of overflows, but always returned -1 on all errors due to incorrectly checking the returnvalue from the PGTYPES* functions.

pgsql: Revert "Add notBefore and notAfter to SSL cert info display"

2024-03-22 Thread Daniel Gustafsson
Revert "Add notBefore and notAfter to SSL cert info display" This reverts commit 6acb0a628eccab8764e0306582c2b7e2a1441b9b since LibreSSL didn't support ASN1_TIME_diff until OpenBSD 7.1, leaving the older OpenBSD animals in the buildfarm complaining. Per plover in the buildfarm. Discussion:

Re: pgsql: Add notBefore and notAfter to SSL cert info display

2024-03-22 Thread Daniel Gustafsson
> On 22 Mar 2024, at 22:46, Jacob Champion > wrote: > > On Fri, Mar 22, 2024 at 2:17 PM Daniel Gustafsson wrote: >> (We have only defined a minimum supported >> version of OpenSSL, we should do the same for LibreSSL since it's right now >> unclear what we supp

Re: pgsql: Add notBefore and notAfter to SSL cert info display

2024-03-22 Thread Daniel Gustafsson
> On 22 Mar 2024, at 21:30, Daniel Gustafsson > wrote: > > Add notBefore and notAfter to SSL cert info display plover running OpenBSD 6.9 is unhappy since apparently LibreSSL only added ASN time diffing in the OpenBSD 7.1 release. Version 6.9 is out of support from OpenBSD wi

pgsql: Add notBefore and notAfter to SSL cert info display

2024-03-22 Thread Daniel Gustafsson
: Daniel Gustafsson Discussion: https://postgr.es/m/182b8565486.10af1a86f158715.2387262617218380...@highgo.ca Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6acb0a628eccab8764e0306582c2b7e2a1441b9b Modified Files -- contrib/sslinfo/Makefile

pgsql: Fix typo in pg_dumpall role comments fix

2024-03-21 Thread Daniel Gustafsson
Fix typo in pg_dumpall role comments fix Some last minute polish of the patch managed to break the SQL query for extracting the role comments due to fat-fingering. Per the buildfarm Xversion tests. Branch -- REL_12_STABLE Details ---

pgsql: Fix typo in pg_dumpall role comments fix

2024-03-21 Thread Daniel Gustafsson
Fix typo in pg_dumpall role comments fix Some last minute polish of the patch managed to break the SQL query for extracting the role comments due to fat-fingering. Per the buildfarm Xversion tests. Branch -- REL_13_STABLE Details ---

pgsql: Fix typo in pg_dumpall role comments fix

2024-03-21 Thread Daniel Gustafsson
Fix typo in pg_dumpall role comments fix Some last minute polish of the patch managed to break the SQL query for extracting the role comments due to fat-fingering. Per the buildfarm Xversion tests. Branch -- REL_14_STABLE Details ---

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
versions. Patch simultaneously written independently by Álvaro and myself. Author: Álvaro Herrera Author: Daniel Gustafsson Reported-by: Bartosz Chroł Discussion: https://postgr.es/m/as8p194mb1271cda0adca7b75fcd8e767f7...@as8p194mb1271.eurp194.prod.outlook.com Discussion: https://postgr.es/m

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
versions. Patch simultaneously written independently by Álvaro and myself. Author: Álvaro Herrera Author: Daniel Gustafsson Reported-by: Bartosz Chroł Discussion: https://postgr.es/m/as8p194mb1271cda0adca7b75fcd8e767f7...@as8p194mb1271.eurp194.prod.outlook.com Discussion: https://postgr.es/m

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
versions. Patch simultaneously written independently by Álvaro and myself. Author: Álvaro Herrera Author: Daniel Gustafsson Reported-by: Bartosz Chroł Discussion: https://postgr.es/m/as8p194mb1271cda0adca7b75fcd8e767f7...@as8p194mb1271.eurp194.prod.outlook.com Discussion: https://postgr.es/m

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
versions. Patch simultaneously written independently by Álvaro and myself. Author: Álvaro Herrera Author: Daniel Gustafsson Reported-by: Bartosz Chroł Discussion: https://postgr.es/m/as8p194mb1271cda0adca7b75fcd8e767f7...@as8p194mb1271.eurp194.prod.outlook.com Discussion: https://postgr.es/m

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
versions. Patch simultaneously written independently by Álvaro and myself. Author: Álvaro Herrera Author: Daniel Gustafsson Reported-by: Bartosz Chroł Discussion: https://postgr.es/m/as8p194mb1271cda0adca7b75fcd8e767f7...@as8p194mb1271.eurp194.prod.outlook.com Discussion: https://postgr.es/m

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
versions. Patch simultaneously written independently by Álvaro and myself. Author: Álvaro Herrera Author: Daniel Gustafsson Reported-by: Bartosz Chroł Discussion: https://postgr.es/m/as8p194mb1271cda0adca7b75fcd8e767f7...@as8p194mb1271.eurp194.prod.outlook.com Discussion: https://postgr.es/m

pgsql: Explicitly require password for SCRAM exchange

2024-03-21 Thread Daniel Gustafsson
Explicitly require password for SCRAM exchange This refactors the SASL init flow to set password_needed on the two SCRAM exchanges currently supported. The code already required this but was set up in such a way that all SASL exchanges required using a password, a restriction which may not hold

pgsql: Refactor SASL exchange to return tri-state status

2024-03-21 Thread Daniel Gustafsson
Refactor SASL exchange to return tri-state status The SASL exchange callback returned state in to output variables: done and success. This refactors that logic by introducing a new return variable of type SASLStatus which makes the code easier to read and understand, and prepares for future SASL

pgsql: pg_upgrade: run all data type checks per connection

2024-03-19 Thread Daniel Gustafsson
pg_upgrade: run all data type checks per connection The checks for data type usage were each connecting to all databases in the cluster and running their query. On clusters which have a lot of databases this can become unnecessarily expensive. This moves the checks to run in a single connection

pgsql: Support json_errdetail in FRONTEND code

2024-03-17 Thread Daniel Gustafsson
Support json_errdetail in FRONTEND code Allocate memory for the error message inside memory owned by the JsonLexContext and move responsibility away from the caller for freeing it. This means that we can partially revert b44669b2ca as this is now safe to use in FRONTEND code. The motivation for

pgsql: Add destroyStringInfo function for cleaning up StringInfos

2024-03-16 Thread Daniel Gustafsson
, it was extracted and committed separately in order to aid upcoming JSON work. Author: Daniel Gustafsson Author: Jacob Champion Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAOYmi+mWdTd6ujtyF7MsvXvk7ToLRVG_tYAcaGbQLvf=n4k...@mail.gmail.com Branch -- master Details --- https

pgsql: Fix handling of expecteddir in pg_regress

2024-03-15 Thread Daniel Gustafsson
Fix handling of expecteddir in pg_regress Commit c855872074b introduced a new parameter to pg_regress to set the directory where to look for expected files, but accidentally only implemented it for when compiling pg_regress for ECPG tests. Fix by adding support for the parameter to the main

pgsql: Fix handling of expecteddir in pg_regress

2024-03-15 Thread Daniel Gustafsson
Fix handling of expecteddir in pg_regress Commit c855872074b introduced a new parameter to pg_regress to set the directory where to look for expected files, but accidentally only implemented it for when compiling pg_regress for ECPG tests. Fix by adding support for the parameter to the main

pgsql: Login event trigger documentation wordsmithing

2024-03-14 Thread Daniel Gustafsson
Login event trigger documentation wordsmithing Minor wordsmithing on the login trigger documentation and code comments to improve readability, as well as fixing a few small incorrect statements in the comments. Author: Robert Treat Discussion:

pgsql: Fix documentation comment for pg_md5_hash

2024-03-14 Thread Daniel Gustafsson
Fix documentation comment for pg_md5_hash Commit b69aba74578 added the errstr parameter to pg_md5_hash but missed updating the synopsis in the documentation comment. The follow-up commit 587de223f03 added the parameter to the list of outputs. The returnvalue had been changed from integer to

pgsql: Replace perror with custom postgres logging

2024-03-08 Thread Daniel Gustafsson
Replace perror with custom postgres logging perror() is not used in postgres anymore out of policy, this replaces the final callsites with the custom postgres logging framework. Reviewed-by: Tom Lane Reviewed-by: Peter Eisentraut Discussion:

pgsql: Fix errorhandling for reading from a pipe

2024-03-08 Thread Daniel Gustafsson
Fix errorhandling for reading from a pipe When reading a line from a pipe failed on no data being read, the errorhandling was erroneously logging with %m even thoug no error description is available for %m to print. This flaw accidentally introduced in 5c7038d70bb. Reported-by: Peter Eisentraut

Re: pgsql: Remove the adminpack contrib extension

2024-03-04 Thread Daniel Gustafsson
> On 4 Mar 2024, at 17:34, Tom Lane wrote: > > Daniel Gustafsson writes: >> I see that my fix didn't solve it for 11 and 9.x on crake and drongo, will >> rebuild more old trees and test to find the correct fix. > > The oldest branches didn't make that DB, so you need

Re: pgsql: Remove the adminpack contrib extension

2024-03-04 Thread Daniel Gustafsson
> On 4 Mar 2024, at 16:27, Alvaro Herrera wrote: > > On 2024-Mar-04, Daniel Gustafsson wrote: > >> The pg_upgrade Xversion test on crake failed on this, I'm trying to reproduce >> the cross-version test locally to verify the below diff but it's right now >>

pgsql: Fix crossversion test for unsupported versions

2024-03-04 Thread Daniel Gustafsson
Fix crossversion test for unsupported versions The fix in be78006741 only accounted for supported versions of postgres but the crossversion test use 11 as the source version, which is an EOL version. Fix by removing the lower bound in the adminpack cleanup. Discussion:

pgsql: Adjust pg_upgrade crossversion test for adminpack

2024-03-04 Thread Daniel Gustafsson
Adjust pg_upgrade crossversion test for adminpack Commit cc09e6549f which removed the adminpack extension failed to instrument the crossversion pg_upgrade test to drop the extension before attempting an upgrade to v17. Discussion: https://postgr.es/m/0cfb76d0-0510-48b2-9916-1199f93bc...@yesql.se

Re: pgsql: Remove the adminpack contrib extension

2024-03-04 Thread Daniel Gustafsson
> On 4 Mar 2024, at 12:43, Daniel Gustafsson wrote: > > Remove the adminpack contrib extension The pg_upgrade Xversion test on crake failed on this, I'm trying to reproduce the cross-version test locally to verify the below diff but it's right now failing on an unrelated thing. If a

pgsql: Remove the adminpack contrib extension

2024-03-04 Thread Daniel Gustafsson
Remove the adminpack contrib extension The adminpack extension was only used to support pgAdmin III, which in turn was declared EOL many years ago. Removing the extension also allows us to remove functions from core as well which were only used to support old version of adminpack. Reviewed-by:

pgsql: doc: Fix datatype for postgres_fdw option

2024-03-04 Thread Daniel Gustafsson
doc: Fix datatype for postgres_fdw option The datatype for analyze_sampling had accidentally been set to text and not string. Backpatch to v16 where analyze_sampling first was introduced. Author: Shinya Kato Reviewed-by: Laurenz Albe Discussion:

pgsql: doc: Fix datatype for postgres_fdw option

2024-03-04 Thread Daniel Gustafsson
doc: Fix datatype for postgres_fdw option The datatype for analyze_sampling had accidentally been set to text and not string. Backpatch to v16 where analyze_sampling first was introduced. Author: Shinya Kato Reviewed-by: Laurenz Albe Discussion:

pgsql: Fix integer underflow in shared memory debugging

2024-02-29 Thread Daniel Gustafsson
Fix integer underflow in shared memory debugging dsa_dump would print a large negative number instead of zero for segment bin 0. Fix by explicitly checking for underflow and add special case for bin 0. Backpatch to all supported versions. Author: Ian Ilyasov Reviewed-by: Robert Haas

pgsql: Fix integer underflow in shared memory debugging

2024-02-29 Thread Daniel Gustafsson
Fix integer underflow in shared memory debugging dsa_dump would print a large negative number instead of zero for segment bin 0. Fix by explicitly checking for underflow and add special case for bin 0. Backpatch to all supported versions. Author: Ian Ilyasov Reviewed-by: Robert Haas

pgsql: Fix integer underflow in shared memory debugging

2024-02-29 Thread Daniel Gustafsson
Fix integer underflow in shared memory debugging dsa_dump would print a large negative number instead of zero for segment bin 0. Fix by explicitly checking for underflow and add special case for bin 0. Backpatch to all supported versions. Author: Ian Ilyasov Reviewed-by: Robert Haas

pgsql: Fix integer underflow in shared memory debugging

2024-02-29 Thread Daniel Gustafsson
Fix integer underflow in shared memory debugging dsa_dump would print a large negative number instead of zero for segment bin 0. Fix by explicitly checking for underflow and add special case for bin 0. Backpatch to all supported versions. Author: Ian Ilyasov Reviewed-by: Robert Haas

pgsql: Fix integer underflow in shared memory debugging

2024-02-29 Thread Daniel Gustafsson
Fix integer underflow in shared memory debugging dsa_dump would print a large negative number instead of zero for segment bin 0. Fix by explicitly checking for underflow and add special case for bin 0. Backpatch to all supported versions. Author: Ian Ilyasov Reviewed-by: Robert Haas

pgsql: Fix integer underflow in shared memory debugging

2024-02-29 Thread Daniel Gustafsson
Fix integer underflow in shared memory debugging dsa_dump would print a large negative number instead of zero for segment bin 0. Fix by explicitly checking for underflow and add special case for bin 0. Backpatch to all supported versions. Author: Ian Ilyasov Reviewed-by: Robert Haas

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

pgsql: doc: Fix link to pg_ident_file_mappings view

2024-02-21 Thread Daniel Gustafsson
doc: Fix link to pg_ident_file_mappings view Commit a2c84990bea7 accidentally used the link for pg_hba_file_rules when linking to pg_ident_file_mappings. Backpatch to v16 where this was introduced. Author: Erik Wienhold Discussion:

pgsql: doc: Fix link to pg_ident_file_mappings view

2024-02-21 Thread Daniel Gustafsson
doc: Fix link to pg_ident_file_mappings view Commit a2c84990bea7 accidentally used the link for pg_hba_file_rules when linking to pg_ident_file_mappings. Backpatch to v16 where this was introduced. Author: Erik Wienhold Discussion:

pgsql: doc: Fix link to pg_ident_file_mappings view

2024-02-21 Thread Daniel Gustafsson
doc: Fix link to pg_ident_file_mappings view Commit a2c84990bea7 accidentally used the link for pg_hba_file_rules when linking to pg_ident_file_mappings. Backpatch to v16 where this was introduced. Author: Erik Wienhold Discussion:

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this

pgsql: doc: Remove links to further reading from pgcrypto docs

2024-02-14 Thread Daniel Gustafsson
doc: Remove links to further reading from pgcrypto docs The pgcrypto docs contained a set of links for useful reading and technical references. These sets of links were however not actively curated and had stale content and dead links. Rather than investing time into maintining these, this

Re: pgsql: Skip .DS_Store files in server side utils

2024-02-13 Thread Daniel Gustafsson
> On 13 Feb 2024, at 13:54, Daniel Gustafsson > wrote: > > Skip .DS_Store files in server side utils > Backpatch-through: v12 Some BF animals for 14-12 failed, so have reverted to allow time for figuring out a proper fix. Sorry for the noice. -- Daniel Gustafsson

pgsql: Revert "Skip .DS_Store files in server side utils"

2024-02-13 Thread Daniel Gustafsson
Revert "Skip .DS_Store files in server side utils" This reverts commit 76bb6dd2e56c14e947196e638f86982424c51254. Per failure reports from the buildfarm. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/588f370b163db25ae38504088b17610123dcb315 Modified Files

pgsql: Revert "Skip .DS_Store files in server side utils"

2024-02-13 Thread Daniel Gustafsson
Revert "Skip .DS_Store files in server side utils" This reverts commit d3fdfdcd1c7f1b714a9a85b893d2c5afc60bea91. Per failure reports from the buildfarm. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/077dec8b6c19152fb3f200610a89c5f71e4045ee Modified Files

pgsql: Revert "Skip .DS_Store files in server side utils"

2024-02-13 Thread Daniel Gustafsson
Revert "Skip .DS_Store files in server side utils" This reverts commit aeee173d229232f94acc61e7bfe81d40f56e478e. Per failure reports from the buildfarm. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/99cd749ce267fd9c0f6461b282f84f65ed9d8535 Modified Files

pgsql: Skip .DS_Store files in server side utils

2024-02-13 Thread Daniel Gustafsson
Skip .DS_Store files in server side utils The macOS Finder application creates .DS_Store files in directories when opened, which creates problems for serverside utilities which expect all files to be PostgreSQL specific files. Skip these files when encountered in pg_checksums, pg_rewind and

  1   2   3   4   5   6   >