pgsql: Add GUC ignore_invalid_pages.

2020-01-21 Thread Fujii Masao
Add GUC ignore_invalid_pages. Detection of WAL records having references to invalid pages during recovery causes PostgreSQL to raise a PANIC-level error, aborting the recovery. Setting ignore_invalid_pages to on causes the system to ignore those WAL records (but still report a warning), and contin

pgsql: Fix the computation of max dead tuples during the vacuum.

2020-01-21 Thread Amit Kapila
Fix the computation of max dead tuples during the vacuum. In commit 40d964ec99, we changed the way memory is allocated for dead tuples but forgot to update the place where we compute the maximum number of dead tuples. This could lead to invalid memory requests. Reported-by: Andres Freund Diagnos

pgsql: Fix concurrent indexing operations with temporary tables

2020-01-21 Thread Michael Paquier
Fix concurrent indexing operations with temporary tables Attempting to use CREATE INDEX, DROP INDEX or REINDEX with CONCURRENTLY on a temporary relation with ON COMMIT actions triggered unexpected errors because those operations use multiple transactions internally to complete their work. Here is

pgsql: Fix concurrent indexing operations with temporary tables

2020-01-21 Thread Michael Paquier
Fix concurrent indexing operations with temporary tables Attempting to use CREATE INDEX, DROP INDEX or REINDEX with CONCURRENTLY on a temporary relation with ON COMMIT actions triggered unexpected errors because those operations use multiple transactions internally to complete their work. Here is

pgsql: Fix concurrent indexing operations with temporary tables

2020-01-21 Thread Michael Paquier
Fix concurrent indexing operations with temporary tables Attempting to use CREATE INDEX, DROP INDEX or REINDEX with CONCURRENTLY on a temporary relation with ON COMMIT actions triggered unexpected errors because those operations use multiple transactions internally to complete their work. Here is

pgsql: Fix concurrent indexing operations with temporary tables

2020-01-21 Thread Michael Paquier
Fix concurrent indexing operations with temporary tables Attempting to use CREATE INDEX, DROP INDEX or REINDEX with CONCURRENTLY on a temporary relation with ON COMMIT actions triggered unexpected errors because those operations use multiple transactions internally to complete their work. Here is

pgsql: Fix concurrent indexing operations with temporary tables

2020-01-21 Thread Michael Paquier
Fix concurrent indexing operations with temporary tables Attempting to use CREATE INDEX, DROP INDEX or REINDEX with CONCURRENTLY on a temporary relation with ON COMMIT actions triggered unexpected errors because those operations use multiple transactions internally to complete their work. Here is

pgsql: Fix concurrent indexing operations with temporary tables

2020-01-21 Thread Michael Paquier
Fix concurrent indexing operations with temporary tables Attempting to use CREATE INDEX, DROP INDEX or REINDEX with CONCURRENTLY on a temporary relation with ON COMMIT actions triggered unexpected errors because those operations use multiple transactions internally to complete their work. Here is

pgsql: Fix concurrent indexing operations with temporary tables

2020-01-21 Thread Michael Paquier
Fix concurrent indexing operations with temporary tables Attempting to use CREATE INDEX, DROP INDEX or REINDEX with CONCURRENTLY on a temporary relation with ON COMMIT actions triggered unexpected errors because those operations use multiple transactions internally to complete their work. Here is

pgsql: Clarify behavior of adding and altering a column in same ALTER c

2020-01-21 Thread Tom Lane
Clarify behavior of adding and altering a column in same ALTER command. The behavior of something like ALTER TABLE transactions ADD COLUMN status varchar(30) DEFAULT 'old', ALTER COLUMN status SET default 'current'; is to fill existing table rows with 'old', not 'current'. That's intentiona