pgsql: Track total amounts of times spent writing and syncing WAL data

2021-03-08 Thread Fujii Masao
Track total amounts of times spent writing and syncing WAL data to disk. This commit adds new GUC track_wal_io_timing. When this is enabled, the total amounts of time XLogWrite writes and issue_xlog_fsync syncs WAL data to disk are counted in pg_stat_wal. This information would be useful to check

pgsql: Add support for more progress reporting in COPY

2021-03-08 Thread Michael Paquier
Add support for more progress reporting in COPY The command (TO or FROM), its type (file, pipe, program or callback), and the number of tuples excluded by a WHERE clause in COPY FROM are added to the progress reporting already available. The column "lines_processed" is renamed to "tuples_processe

Re: pgsql: Remove support for SSL compression

2021-03-08 Thread Michael Paquier
On Tue, Mar 09, 2021 at 02:18:52AM +, Michael Paquier wrote: > Remove support for SSL compression > > PostgreSQL disabled compression as of e3bdb2d and the documentation > recommends against using it since. Additionally, SSL compression has > been disabled in OpenSSL since version 1.1.0, and

pgsql: Remove support for SSL compression

2021-03-08 Thread Michael Paquier
Remove support for SSL compression PostgreSQL disabled compression as of e3bdb2d and the documentation recommends against using it since. Additionally, SSL compression has been disabled in OpenSSL since version 1.1.0, and was disabled in many distributions long before that. The most recent TLS v

pgsql: Complain if a function-in-FROM returns a set when it shouldn't.

2021-03-08 Thread Tom Lane
Complain if a function-in-FROM returns a set when it shouldn't. Throw a "function protocol violation" error if a function in FROM tries to return a set though it wasn't marked proretset. Although such cases work at the moment, it doesn't seem like something we want to guarantee will keep working.

pgsql: Properly mark pg_stat_get_subscription() as returning a set.

2021-03-08 Thread Tom Lane
Properly mark pg_stat_get_subscription() as returning a set. The initial catalog data for this function failed to set proretset or provide a prorows estimate. It accidentally worked anyway when invoked in the FROM clause, because the executor isn't too picky about this; but the planner didn't exp

pgsql: Validate the OID argument of pg_import_system_collations().

2021-03-08 Thread Tom Lane
Validate the OID argument of pg_import_system_collations(). "SELECT pg_import_system_collations(0)" caused an assertion failure. With a random nonzero argument --- or indeed with zero, in non-assert builds --- it would happily make pg_collation entries with garbage values of collnamespace. These

pgsql: Validate the OID argument of pg_import_system_collations().

2021-03-08 Thread Tom Lane
Validate the OID argument of pg_import_system_collations(). "SELECT pg_import_system_collations(0)" caused an assertion failure. With a random nonzero argument --- or indeed with zero, in non-assert builds --- it would happily make pg_collation entries with garbage values of collnamespace. These

pgsql: Validate the OID argument of pg_import_system_collations().

2021-03-08 Thread Tom Lane
Validate the OID argument of pg_import_system_collations(). "SELECT pg_import_system_collations(0)" caused an assertion failure. With a random nonzero argument --- or indeed with zero, in non-assert builds --- it would happily make pg_collation entries with garbage values of collnamespace. These

pgsql: Validate the OID argument of pg_import_system_collations().

2021-03-08 Thread Tom Lane
Validate the OID argument of pg_import_system_collations(). "SELECT pg_import_system_collations(0)" caused an assertion failure. With a random nonzero argument --- or indeed with zero, in non-assert builds --- it would happily make pg_collation entries with garbage values of collnamespace. These

pgsql: Validate the OID argument of pg_import_system_collations().

2021-03-08 Thread Tom Lane
Validate the OID argument of pg_import_system_collations(). "SELECT pg_import_system_collations(0)" caused an assertion failure. With a random nonzero argument --- or indeed with zero, in non-assert builds --- it would happily make pg_collation entries with garbage values of collnamespace. These

pgsql: Further tweak memory management for regex DFAs.

2021-03-08 Thread Tom Lane
Further tweak memory management for regex DFAs. Coverity is still unhappy after commit 190c79884, and after looking closer I think it might be onto something. The callers of newdfa() typically drop out if v->err has been set nonzero, which newdfa() is faithfully doing if it fails. However, what