pgsql: Fix failures in SSL tests caused by out-of-tree keys and certifi

2022-03-21 Thread Michael Paquier
Fix failures in SSL tests caused by out-of-tree keys and certificates This issue is environment-sensitive, where the SSL tests could fail in various way by feeding on defaults provided by sslcert, sslkey, sslrootkey, sslrootcert, sslcrl and sslcrldir coming from a local setup, as of

pgsql: Fix failures in SSL tests caused by out-of-tree keys and certifi

2022-03-21 Thread Michael Paquier
Fix failures in SSL tests caused by out-of-tree keys and certificates This issue is environment-sensitive, where the SSL tests could fail in various way by feeding on defaults provided by sslcert, sslkey, sslrootkey, sslrootcert, sslcrl and sslcrldir coming from a local setup, as of

pgsql: Fix failures in SSL tests caused by out-of-tree keys and certifi

2022-03-21 Thread Michael Paquier
Fix failures in SSL tests caused by out-of-tree keys and certificates This issue is environment-sensitive, where the SSL tests could fail in various way by feeding on defaults provided by sslcert, sslkey, sslrootkey, sslrootcert, sslcrl and sslcrldir coming from a local setup, as of

pgsql: Fix failures in SSL tests caused by out-of-tree keys and certifi

2022-03-21 Thread Michael Paquier
Fix failures in SSL tests caused by out-of-tree keys and certificates This issue is environment-sensitive, where the SSL tests could fail in various way by feeding on defaults provided by sslcert, sslkey, sslrootkey, sslrootcert, sslcrl and sslcrldir coming from a local setup, as of

pgsql: Fix failures in SSL tests caused by out-of-tree keys and certifi

2022-03-21 Thread Michael Paquier
Fix failures in SSL tests caused by out-of-tree keys and certificates This issue is environment-sensitive, where the SSL tests could fail in various way by feeding on defaults provided by sslcert, sslkey, sslrootkey, sslrootcert, sslcrl and sslcrldir coming from a local setup, as of

pgsql: Fix failures in SSL tests caused by out-of-tree keys and certifi

2022-03-21 Thread Michael Paquier
Fix failures in SSL tests caused by out-of-tree keys and certificates This issue is environment-sensitive, where the SSL tests could fail in various way by feeding on defaults provided by sslcert, sslkey, sslrootkey, sslrootcert, sslcrl and sslcrldir coming from a local setup, as of

Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP.

2022-03-21 Thread Amit Kapila
On Tue, Mar 22, 2022 at 7:36 AM Tom Lane wrote: > > Amit Kapila writes: > > The user can specify LSN by ALTER SUBSCRIPTION ... SKIP (lsn = XXX), > > which allows the apply worker to skip the transaction finished at > > specified LSN. The apply worker skips all data modification changes within >

Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP.

2022-03-21 Thread Tom Lane
Amit Kapila writes: > The user can specify LSN by ALTER SUBSCRIPTION ... SKIP (lsn = XXX), > which allows the apply worker to skip the transaction finished at > specified LSN. The apply worker skips all data modification changes within > the transaction. Hmm ... this seems like a really poor

pgsql: Add ALTER SUBSCRIPTION ... SKIP.

2022-03-21 Thread Amit Kapila
Add ALTER SUBSCRIPTION ... SKIP. This feature allows skipping the transaction on subscriber nodes. If incoming change violates any constraint, logical replication stops until it's resolved. Currently, users need to either manually resolve the conflict by updating a subscriber-side database or by

pgsql: pgstat: reorder pgstat.[ch] contents.

2022-03-21 Thread Andres Freund
pgstat: reorder pgstat.[ch] contents. Now that 13619598f10 has split pgstat up into multiple files it isn't quite as hard to come up with a sensible order for pgstat.[ch]. Inconsistent naming makes it still not quite right looking, but that's work for another commit. Author: Andres Freund

pgsql: Fix assorted missing logic for GroupingFunc nodes.

2022-03-21 Thread Tom Lane
Fix assorted missing logic for GroupingFunc nodes. The planner needs to treat GroupingFunc like Aggref for many purposes, in particular with respect to processing of the argument expressions, which are not to be evaluated at runtime. A few places hadn't gotten that memo, notably including

pgsql: Fix assorted missing logic for GroupingFunc nodes.

2022-03-21 Thread Tom Lane
Fix assorted missing logic for GroupingFunc nodes. The planner needs to treat GroupingFunc like Aggref for many purposes, in particular with respect to processing of the argument expressions, which are not to be evaluated at runtime. A few places hadn't gotten that memo, notably including

pgsql: Fix assorted missing logic for GroupingFunc nodes.

2022-03-21 Thread Tom Lane
Fix assorted missing logic for GroupingFunc nodes. The planner needs to treat GroupingFunc like Aggref for many purposes, in particular with respect to processing of the argument expressions, which are not to be evaluated at runtime. A few places hadn't gotten that memo, notably including

pgsql: Fix assorted missing logic for GroupingFunc nodes.

2022-03-21 Thread Tom Lane
Fix assorted missing logic for GroupingFunc nodes. The planner needs to treat GroupingFunc like Aggref for many purposes, in particular with respect to processing of the argument expressions, which are not to be evaluated at runtime. A few places hadn't gotten that memo, notably including

pgsql: Fix assorted missing logic for GroupingFunc nodes.

2022-03-21 Thread Tom Lane
Fix assorted missing logic for GroupingFunc nodes. The planner needs to treat GroupingFunc like Aggref for many purposes, in particular with respect to processing of the argument expressions, which are not to be evaluated at runtime. A few places hadn't gotten that memo, notably including

pgsql: Fix assorted missing logic for GroupingFunc nodes.

2022-03-21 Thread Tom Lane
Fix assorted missing logic for GroupingFunc nodes. The planner needs to treat GroupingFunc like Aggref for many purposes, in particular with respect to processing of the argument expressions, which are not to be evaluated at runtime. A few places hadn't gotten that memo, notably including

pgsql: pgstat: split different types of stats into separate files.

2022-03-21 Thread Andres Freund
pgstat: split different types of stats into separate files. pgstat.c is very long, and it's hard to find an order that makes sense and is likely to be maintained over time. Splitting the different pieces into separate files makes that a lot easier. With a few exceptions, this commit just moves

pgsql: Fix bogus dependency handling for GENERATED expressions.

2022-03-21 Thread Tom Lane
Fix bogus dependency handling for GENERATED expressions. For GENERATED columns, we record all dependencies of the generation expression as AUTO dependencies of the column itself. This means that the generated column is silently dropped if any dependency is removed, even if CASCADE wasn't

pgsql: Move pg_attrdef manipulation code into new file catalog/pg_attrd

2022-03-21 Thread Tom Lane
Move pg_attrdef manipulation code into new file catalog/pg_attrdef.c. This is a pure refactoring commit: there isn't (I hope) any functional change. StoreAttrDefault and RemoveAttrDefault[ById] are moved from heap.c, reducing the size of that overly-large file by about 300 lines. I took the

pgsql: Fix risk of deadlock failure while dropping a partitioned index.

2022-03-21 Thread Tom Lane
Fix risk of deadlock failure while dropping a partitioned index. DROP INDEX needs to lock the index's table before the index itself, else it will deadlock against ordinary queries that acquire the relation locks in that order. This is correctly mechanized for plain indexes by

pgsql: Fix risk of deadlock failure while dropping a partitioned index.

2022-03-21 Thread Tom Lane
Fix risk of deadlock failure while dropping a partitioned index. DROP INDEX needs to lock the index's table before the index itself, else it will deadlock against ordinary queries that acquire the relation locks in that order. This is correctly mechanized for plain indexes by

pgsql: Fix risk of deadlock failure while dropping a partitioned index.

2022-03-21 Thread Tom Lane
Fix risk of deadlock failure while dropping a partitioned index. DROP INDEX needs to lock the index's table before the index itself, else it will deadlock against ordinary queries that acquire the relation locks in that order. This is correctly mechanized for plain indexes by

pgsql: Fix risk of deadlock failure while dropping a partitioned index.

2022-03-21 Thread Tom Lane
Fix risk of deadlock failure while dropping a partitioned index. DROP INDEX needs to lock the index's table before the index itself, else it will deadlock against ordinary queries that acquire the relation locks in that order. This is correctly mechanized for plain indexes by

pgsql: Fix risk of deadlock failure while dropping a partitioned index.

2022-03-21 Thread Tom Lane
Fix risk of deadlock failure while dropping a partitioned index. DROP INDEX needs to lock the index's table before the index itself, else it will deadlock against ordinary queries that acquire the relation locks in that order. This is correctly mechanized for plain indexes by

pgsql: Remove workarounds for avoiding [U]INT64_FORMAT in translatable

2022-03-21 Thread Tom Lane
Remove workarounds for avoiding [U]INT64_FORMAT in translatable strings. Further code simplification along the same lines as d914eb347 and earlier patches. Aleksander Alekseev, Japin Li Discussion: https://postgr.es/m/caj7c6tmski3xs8h5mp38xonqqpblazjvvxvfpn++roitdjc...@mail.gmail.com Branch

Re: pgsql: Allow extensions to add new backup targets.

2022-03-21 Thread Robert Haas
On Mon, Mar 21, 2022 at 6:38 AM Magnus Hagander wrote: > This one has a tiny copy/paste error where the idenfiication comment > for basebackup_target.c claims it's basebackup_gzip.c. I've pushed a > fix. Thanks. If that's the extent of the problems we're doing well! -- Robert Haas EDB:

Re: pgsql: Allow extensions to add new backup targets.

2022-03-21 Thread Magnus Hagander
On Tue, Mar 15, 2022 at 7:33 PM Robert Haas wrote: > > Allow extensions to add new backup targets. > > Commit 3500ccc39b0dadd1068a03938e4b8ff562587ccc allowed for base backup > targets, meaning that we could do something with the backup other than > send it to the client, but all of those targets

pgsql: Fix typo in file identification

2022-03-21 Thread Magnus Hagander
Fix typo in file identification Clearly a simple copy/paste mistake when the file was created. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c540d3715731e0e50259011ee62ea4c0c042b1b1 Modified Files -- src/backend/replication/basebackup_target.c | 2 +-