Re: pgsql: Refactor libpq state machine for negotiating encryption

2024-04-12 Thread Heikki Linnakangas
On 11/04/2024 20:07, Heikki Linnakangas wrote: On 11/04/2024 02:33, Thomas Munro wrote: On Thu, Apr 11, 2024 at 11:25 AM Tom Lane wrote: Thomas Munro writes: If -Dssl=none and -Dgssapi=disabled, compilation of fe-connect.c fails: call to undeclared function 'encryption_negotiation_failed'.

pgsql: Document PG_TEST_EXTRA=libpq_encryption and also check 'kerberos

2024-04-12 Thread Heikki Linnakangas
Document PG_TEST_EXTRA=libpq_encryption and also check 'kerberos' In the libpq encryption negotiation tests, don't run the GSSAPI tests unless PG_TEST_EXTRA='kerberos' is also set. That makes it possible to still run most of the tests when GSSAPI support is compiled in, but there's no MIT

pgsql: Fix libpq_encryption tests when compiled without SSL support

2024-04-12 Thread Heikki Linnakangas
Fix libpq_encryption tests when compiled without SSL support It correctly skipped tests involving SSL in the server when SSL support was not compiled in, but even when SSL is not enabled in the server and the connection is established without SSL, libpq behaves differently in many of the test

pgsql: Move libpq encryption negotiation tests

2024-04-12 Thread Heikki Linnakangas
Move libpq encryption negotiation tests The test targets libpq's options, so 'src/test/interfaces/libpq/t' is a more natural place for it. While doing this, I noticed that I had missed adding the libpq_encryption subdir to the Makefile. That's why this commit only needs to remove it from the

pgsql: Fix compilation with --with-gssapi --without-openssl

2024-04-12 Thread Heikki Linnakangas
Fix compilation with --with-gssapi --without-openssl The #define is spelled ENABLE_GSS, not USE_GSS. Introduced in commit 05fd30c0e7, reported by Thomas Munro. Discussion: https://www.postgresql.org/message-id/ca%2bhukg%2bhrttb%2bx%2bkkkj_cfx6snhbeguqmgxjgmwdvpg7ygf...@mail.gmail.com Branch

pgsql: Shrink test file for test_json_parser module

2024-04-12 Thread Andrew Dunstan
Shrink test file for test_json_parser module Also delete live URLs Jacob Champion Discussion: https://postgr.es/m/CAOYmi+mtH=v1wzkaoaucd5qqqwr61hnxmjbj9h-czxaa1jx...@mail.gmail.com Branch -- master Details ---

pgsql: Assorted minor cleanups in the test_json_parser module

2024-04-12 Thread Andrew Dunstan
Assorted minor cleanups in the test_json_parser module Per gripes from Michael Paquier Discussion: https://postgr.es/m/zhtq6_w1vwohq...@paquier.xyz Along the way, also clean up a handful of typos in 3311ea86ed and ea7b4e9a2a, found by Alexander Lakhin, and a couple of stylistic snafus noted by

pgsql: Add a TAP test for test_json_parser_perf

2024-04-12 Thread Andrew Dunstan
Add a TAP test for test_json_parser_perf This just makes sure the test can run with a single iteration. A real performance test would test with many more. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/daf554dbeabf0957a25c9e37488d42c047c0ce23 Modified Files

pgsql: Don't allocate large buffer on the stack in pg_verifybackup

2024-04-12 Thread Andrew Dunstan
Don't allocate large buffer on the stack in pg_verifybackup Per complaint from Andres Freund. Follow his suggestion to allocate the buffer once in the calling routine instead. Also make a tiny indentation improvement. Discussion:

pgsql: Fix some memory leaks associated with parsing json and manifests

2024-04-12 Thread Andrew Dunstan
Fix some memory leaks associated with parsing json and manifests Coverity complained about not freeing some memory associated with incrementally parsing backup manifests. To fix that, provide and use a new shutdown function for the JsonManifestParseIncrementalState object, in line with a

pgsql: Fix recently introduced typo in code comment

2024-04-12 Thread David Rowley
Fix recently introduced typo in code comment Reported-by: Richard Guo Discussion: https://postgr.es/m/cambws49kaszusj7-0sblve9+ukz0rcqmemm3nvytc1yvs8s...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b9ecefecc7aaad117e0255b56b759f524f0f4363

pgsql: Fix the review comments and a bug in the slot sync code.

2024-04-12 Thread Amit Kapila
Fix the review comments and a bug in the slot sync code. Ensure that when updating the catalog_xmin of the synced slots, it is first written to disk before changing the in-memory value (effective_catalog_xmin). This is to prevent a scenario where the in-memory value change triggers a vacuum to

pgsql: Fix IS [NOT] NULL qual optimization for inheritance tables

2024-04-12 Thread David Rowley
Fix IS [NOT] NULL qual optimization for inheritance tables b262ad440 added code to have the planner remove redundant IS NOT NULL quals and eliminate needless scans for IS NULL quals on tables where the qual's column has a NOT NULL constraint. That commit failed to consider that an inheritance