pgsql: Add TAP test in pg_dump with --format=tar and --compress

2022-03-29 Thread Michael Paquier
Add TAP test in pg_dump with --format=tar and --compress This combination of options has never been supported, and it has never been checked in the regression tests. When building the code without zlib support, pg_dump is allowed to run and it generates a warning to inform that any contents are d

pgsql: Skip empty transactions for logical replication.

2022-03-29 Thread Amit Kapila
Skip empty transactions for logical replication. The current logical replication behavior is to send every transaction to subscriber even if the transaction is empty. This can happen because transaction doesn't contain changes from the selected publications or all the changes got filtered. It is a

Re: pgsql: Add function to pump IPC process until string match

2022-03-29 Thread Andres Freund
Hi, On 2022-02-23 13:32:03 +, Daniel Gustafsson wrote: > Add function to pump IPC process until string match > > Refactor the recovery tests to not carry a local duplicated copy of > the pump_until function which pumps a process until a defined string > is seen on a stream. This reduces dupli

pgsql: Make PostgreSQL::Test::Cluster::run_log() return a useful value.

2022-03-29 Thread Robert Haas
Make PostgreSQL::Test::Cluster::run_log() return a useful value. Curently, some TAP test that directly call the underlying function PostgreSQL::Test::Utils::run_log() care about the return value, but none of those that call it via PostgreSQL::Test::Cluster::run_log() care. However, I'd like to add

pgsql: SQL/JSON query functions

2022-03-29 Thread Andrew Dunstan
SQL/JSON query functions This introduces the SQL/JSON functions for querying JSON data using jsonpath expressions. The functions are: JSON_EXISTS() JSON_QUERY() JSON_VALUE() All of these functions only operate on jsonb. The workaround for now is to cast the argument to jsonb. JSON_EXISTS() test

pgsql: In 020_createdb.pl, change order of command-line arguments.

2022-03-29 Thread Robert Haas
In 020_createdb.pl, change order of command-line arguments. Linux thinks that something like "createdb foo -S bar" is perfectly fine, but Windows wants the options to precede any bare arguments, so we must write "createdb -S bar foo" for portability. Per reports from CI, the buildfarm, and Andres

pgsql: Add new block-by-block strategy for CREATE DATABASE.

2022-03-29 Thread Robert Haas
Add new block-by-block strategy for CREATE DATABASE. Because this strategy logs changes on a block-by-block basis, it avoids the need to checkpoint before and after the operation. However, because it logs each changed block individually, it might generate a lot of extra write-ahead logging if the

pgsql: Revert "Fix replay of create database records on standby"

2022-03-29 Thread Alvaro Herrera
Revert "Fix replay of create database records on standby" This reverts commit 49d9cfc68bf4. The approach taken by this patch has problems, so we'll come up with a radically different fix. Discussion: https://postgr.es/m/CA+TgmoYcUPL+WOJL2ZzhH=zmrhj0iOQ=icfm0suyqbbqzea...@mail.gmail.com Branch

pgsql: Revert "Fix replay of create database records on standby"

2022-03-29 Thread Alvaro Herrera
Revert "Fix replay of create database records on standby" This reverts commit 49d9cfc68bf4. The approach taken by this patch has problems, so we'll come up with a radically different fix. Discussion: https://postgr.es/m/CA+TgmoYcUPL+WOJL2ZzhH=zmrhj0iOQ=icfm0suyqbbqzea...@mail.gmail.com Branch

pgsql: Revert "Fix replay of create database records on standby"

2022-03-29 Thread Alvaro Herrera
Revert "Fix replay of create database records on standby" This reverts commit 49d9cfc68bf4. The approach taken by this patch has problems, so we'll come up with a radically different fix. Discussion: https://postgr.es/m/CA+TgmoYcUPL+WOJL2ZzhH=zmrhj0iOQ=icfm0suyqbbqzea...@mail.gmail.com Branch

pgsql: Explain why the startup process can't cause a shortage of sinval

2022-03-29 Thread Robert Haas
Explain why the startup process can't cause a shortage of sinval slots. Bharath Rupireddy, reviewed by Fujii Masao and Yura Sokolov. Lightly edited by me. Discussion: http://postgr.es/m/CALj2ACU=3_frMkDp9UUeuZoAMjaK1y0Z_q5RFNbGvwi8NM==a...@mail.gmail.com Branch -- master Details --- ht

pgsql: doc: Make UPDATE FROM examples consistent

2022-03-29 Thread Daniel Gustafsson
doc: Make UPDATE FROM examples consistent The original first half of the example used an employees table and an accounts.sales_person foreign key column, while the second half (added in commit 8f889b1083f) used a salesmen table and accounts.sales_id for the foreign key. This makes everything use

pgsql: Enable SSL library detection via PQsslAttribute()

2022-03-29 Thread Daniel Gustafsson
Enable SSL library detection via PQsslAttribute() Currently, libpq client code must have a connection handle before it can query the "library" SSL attribute. This poses problems if the client needs to know what SSL library is in use before constructing a connection string. Allow PQsslAttribute(N

pgsql: psql: Add test for psql behavior on server crash

2022-03-29 Thread Peter Eisentraut
psql: Add test for psql behavior on server crash Author: Fabien COELHO Discussion: https://www.postgresql.org/message-id/flat/alpine.DEB.2.21.1904132231510.8961@lancre Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8cd7627c7b19c5a1bb235e7ad91b53856b101e65 Modifi