pgsql: Allow specifying row filters for logical replication of tables.

2022-02-21 Thread Amit Kapila
Allow specifying row filters for logical replication of tables. This feature adds row filtering for publication tables. When a publication is defined or modified, an optional WHERE clause can be specified. Rows that don't satisfy this WHERE clause will be filtered out. This allows a set of tables

pgsql: Add compute_query_id = regress

2022-02-21 Thread Michael Paquier
Add compute_query_id = regress "regress" is a new mode added to compute_query_id aimed at facilitating regression testing when a module computing query IDs is loaded into the backend, like pg_stat_statements. It works the same way as "auto", meaning that query IDs are computed if a module enables

pgsql: Add compute_query_id = regress

2022-02-21 Thread Michael Paquier
Add compute_query_id = regress "regress" is a new mode added to compute_query_id aimed at facilitating regression testing when a module computing query IDs is loaded into the backend, like pg_stat_statements. It works the same way as "auto", meaning that query IDs are computed if a module enables

pgsql: Disallow setting bogus GUCs within an extension's reserved names

2022-02-21 Thread Tom Lane
Disallow setting bogus GUCs within an extension's reserved namespace. Commit 75d22069e tried to throw a warning for setting a custom GUC whose prefix belongs to a previously-loaded extension, if there is no such GUC defined by the extension. But that caused unstable behavior with parallel workers

pgsql: Fix temporary object cleanup failing due to toast access without

2022-02-21 Thread Andres Freund
Fix temporary object cleanup failing due to toast access without snapshot. When cleaning up temporary objects during process exit the cleanup could fail with: FATAL: cannot fetch toast data without an active snapshot The bug is caused by RemoveTempRelationsCallback() not setting up a snapshot.

pgsql: Fix temporary object cleanup failing due to toast access without

2022-02-21 Thread Andres Freund
Fix temporary object cleanup failing due to toast access without snapshot. When cleaning up temporary objects during process exit the cleanup could fail with: FATAL: cannot fetch toast data without an active snapshot The bug is caused by RemoveTempRelationsCallback() not setting up a snapshot.

pgsql: Fix temporary object cleanup failing due to toast access without

2022-02-21 Thread Andres Freund
Fix temporary object cleanup failing due to toast access without snapshot. When cleaning up temporary objects during process exit the cleanup could fail with: FATAL: cannot fetch toast data without an active snapshot The bug is caused by RemoveTempRelationsCallback() not setting up a snapshot.

pgsql: Fix temporary object cleanup failing due to toast access without

2022-02-21 Thread Andres Freund
Fix temporary object cleanup failing due to toast access without snapshot. When cleaning up temporary objects during process exit the cleanup could fail with: FATAL: cannot fetch toast data without an active snapshot The bug is caused by RemoveTempRelationsCallback() not setting up a snapshot.

pgsql: Assert in init_toast_snapshot() that some snapshot registered or

2022-02-21 Thread Andres Freund
Assert in init_toast_snapshot() that some snapshot registered or active. Commit fixed the bug that RemoveTempRelationsCallback() did not push/register a snapshot. That only went unnoticed because often a valid catalog snapshot exists and is returned by GetOldestSnapshot(). But due to invalidation

pgsql: Fix temporary object cleanup failing due to toast access without

2022-02-21 Thread Andres Freund
Fix temporary object cleanup failing due to toast access without snapshot. When cleaning up temporary objects during process exit the cleanup could fail with: FATAL: cannot fetch toast data without an active snapshot The bug is caused by RemoveTempRelationsCallback() not setting up a snapshot.

pgsql: Fix temporary object cleanup failing due to toast access without

2022-02-21 Thread Andres Freund
Fix temporary object cleanup failing due to toast access without snapshot. When cleaning up temporary objects during process exit the cleanup could fail with: FATAL: cannot fetch toast data without an active snapshot The bug is caused by RemoveTempRelationsCallback() not setting up a snapshot.

pgsql: pg_upgrade: Don't print progress status when output is not a tty

2022-02-21 Thread Andres Freund
pg_upgrade: Don't print progress status when output is not a tty. Until this change pg_upgrade with output redirected to a file / pipe would end up printing all files in the cluster. This has made check-world output exceedingly verbose. Author: Andres Freund Reviewed-By: Justin Pryzby Reviewed-

pgsql: pgcrypto: Remove unused error code

2022-02-21 Thread Peter Eisentraut
pgcrypto: Remove unused error code PXE_DEV_READ_ERROR hasn't been used since random device support was removed from pgcrypto (fe0a0b5993dfe24e4b3bcf52fa64ff41a444b8f1). Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3f649663a49d5bb815858d90a271bb532c58fd0e Modifie

pgsql: pgcrypto: Remove unused error code

2022-02-21 Thread Peter Eisentraut
pgcrypto: Remove unused error code PXE_MCRYPT_INTERNAL was apparently never used even when it was added. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/abe81ee08468e63f94b91e484f47c867bcc706d3 Modified Files -- contrib/pgcrypto/px.c | 1 - contrib/pgcry

pgsql: Fix possible null pointer reference

2022-02-21 Thread Peter Eisentraut
Fix possible null pointer reference Per Coverity. Introduced in 37851a8b83d3d57ca48736093b10aa5f3bc0c177. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5c868c92caa864d223006c095d623b8086754c6f Modified Files -- src/backend/utils/init/postinit.c | 3 +