Re: pgsql: Fix bug that could try to freeze running multixacts.

2019-10-16 Thread Alvaro Herrera
On 2019-Oct-16, Thomas Munro wrote: > Fix bug that could try to freeze running multixacts. > > Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to > try to freeze a multixact that is still running. Hmm, is that one commit or two commits that are the same? -- Álvaro Herrera

pgsql: When restoring GUCs in parallel workers, show an error context.

2019-10-16 Thread Thomas Munro
When restoring GUCs in parallel workers, show an error context. Otherwise it can be hard to see where an error is coming from, when the parallel worker sets all the GUCs that it received from the leader. Bug #15726. Back-patch to 9.5, where RestoreGUCState() appeared. Reported-by: Tiago Anastac

pgsql: When restoring GUCs in parallel workers, show an error context.

2019-10-16 Thread Thomas Munro
When restoring GUCs in parallel workers, show an error context. Otherwise it can be hard to see where an error is coming from, when the parallel worker sets all the GUCs that it received from the leader. Bug #15726. Back-patch to 9.5, where RestoreGUCState() appeared. Reported-by: Tiago Anastac

pgsql: When restoring GUCs in parallel workers, show an error context.

2019-10-16 Thread Thomas Munro
When restoring GUCs in parallel workers, show an error context. Otherwise it can be hard to see where an error is coming from, when the parallel worker sets all the GUCs that it received from the leader. Bug #15726. Back-patch to 9.5, where RestoreGUCState() appeared. Reported-by: Tiago Anastac

pgsql: When restoring GUCs in parallel workers, show an error context.

2019-10-16 Thread Thomas Munro
When restoring GUCs in parallel workers, show an error context. Otherwise it can be hard to see where an error is coming from, when the parallel worker sets all the GUCs that it received from the leader. Bug #15726. Back-patch to 9.5, where RestoreGUCState() appeared. Reported-by: Tiago Anastac

pgsql: When restoring GUCs in parallel workers, show an error context.

2019-10-16 Thread Thomas Munro
When restoring GUCs in parallel workers, show an error context. Otherwise it can be hard to see where an error is coming from, when the parallel worker sets all the GUCs that it received from the leader. Bug #15726. Back-patch to 9.5, where RestoreGUCState() appeared. Reported-by: Tiago Anastac

pgsql: When restoring GUCs in parallel workers, show an error context.

2019-10-16 Thread Thomas Munro
When restoring GUCs in parallel workers, show an error context. Otherwise it can be hard to see where an error is coming from, when the parallel worker sets all the GUCs that it received from the leader. Bug #15726. Back-patch to 9.5, where RestoreGUCState() appeared. Reported-by: Tiago Anastac

pgsql: Fix bug that could try to freeze running multixacts.

2019-10-16 Thread Thomas Munro
Fix bug that could try to freeze running multixacts. Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to try to freeze a multixact that is still running. That was prevented by a check, but raised an error. Repair. Back-patch all the way. Author: Nathan Bossart, Jeremy Schneider Report

pgsql: Fix bug that could try to freeze running multixacts.

2019-10-16 Thread Thomas Munro
Fix bug that could try to freeze running multixacts. Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to try to freeze a multixact that is still running. That was prevented by a check, but raised an error. Repair. Back-patch all the way. Author: Nathan Bossart, Jeremy Schneider Report

pgsql: Fix bug that could try to freeze running multixacts.

2019-10-16 Thread Thomas Munro
Fix bug that could try to freeze running multixacts. Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to try to freeze a multixact that is still running. That was prevented by a check, but raised an error. Repair. Back-patch all the way. Author: Nathan Bossart, Jeremy Schneider Report

pgsql: Fix bug that could try to freeze running multixacts.

2019-10-16 Thread Thomas Munro
Fix bug that could try to freeze running multixacts. Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to try to freeze a multixact that is still running. That was prevented by a check, but raised an error. Repair. Back-patch all the way. Author: Nathan Bossart, Jeremy Schneider Report

pgsql: Fix bug that could try to freeze running multixacts.

2019-10-16 Thread Thomas Munro
Fix bug that could try to freeze running multixacts. Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to try to freeze a multixact that is still running. That was prevented by a check, but raised an error. Repair. Back-patch all the way. Author: Nathan Bossart, Jeremy Schneider Report

pgsql: Fix bug that could try to freeze running multixacts.

2019-10-16 Thread Thomas Munro
Fix bug that could try to freeze running multixacts. Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to try to freeze a multixact that is still running. That was prevented by a check, but raised an error. Repair. Back-patch all the way. Author: Nathan Bossart, Jeremy Schneider Report

pgsql: Fix bug that could try to freeze running multixacts.

2019-10-16 Thread Thomas Munro
Fix bug that could try to freeze running multixacts. Commits 801c2dc7 and 801c2dc7 made it possible for vacuum to try to freeze a multixact that is still running. That was prevented by a check, but raised an error. Repair. Back-patch all the way. Author: Nathan Bossart, Jeremy Schneider Report

pgsql: Add missing include to pg_upgrade/version.c

2019-10-16 Thread Tomas Vondra
Add missing include to pg_upgrade/version.c Commit 8d48e6a724 uses RELKIND_ constants when building the query, but did not include the header defining them. On 10+ this header is already included, but on 9.6 and earlier it was missing. It compiles just fine, but then fails during execution ERRO

pgsql: Add missing include to pg_upgrade/version.c

2019-10-16 Thread Tomas Vondra
Add missing include to pg_upgrade/version.c Commit 8d48e6a724 uses RELKIND_ constants when building the query, but did not include the header defining them. On 10+ this header is already included, but on 9.6 and earlier it was missing. It compiles just fine, but then fails during execution ERRO

pgsql: Add missing include to pg_upgrade/version.c

2019-10-16 Thread Tomas Vondra
Add missing include to pg_upgrade/version.c Commit 8d48e6a724 uses RELKIND_ constants when building the query, but did not include the header defining them. On 10+ this header is already included, but on 9.6 and earlier it was missing. It compiles just fine, but then fails during execution ERRO

pgsql: Fix crash when reporting CREATE INDEX progress

2019-10-16 Thread Alvaro Herrera
Fix crash when reporting CREATE INDEX progress A race condition can make us try to dereference a NULL pointer to the PGPROC struct of a process that's already finished. That results in crashes during REINDEX CONCURRENTLY and CREATE INDEX CONCURRENTLY. This was introduced in ab0dfc961b6a, so back

pgsql: Fix crash when reporting CREATE INDEX progress

2019-10-16 Thread Alvaro Herrera
Fix crash when reporting CREATE INDEX progress A race condition can make us try to dereference a NULL pointer to the PGPROC struct of a process that's already finished. That results in crashes during REINDEX CONCURRENTLY and CREATE INDEX CONCURRENTLY. This was introduced in ab0dfc961b6a, so back

pgsql: Improve the check for pg_catalog.line data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.line data type in pg_upgrade The pg_upgrade check for pg_catalog.line data type when upgrading from 9.3 had a couple of issues with domains and composite types. Firstly, it triggered false positives for composite types unused in objects with storage. This was enoug

pgsql: Improve the check for pg_catalog.line data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.line data type in pg_upgrade The pg_upgrade check for pg_catalog.line data type when upgrading from 9.3 had a couple of issues with domains and composite types. Firstly, it triggered false positives for composite types unused in objects with storage. This was enoug

pgsql: Improve the check for pg_catalog.line data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.line data type in pg_upgrade The pg_upgrade check for pg_catalog.line data type when upgrading from 9.3 had a couple of issues with domains and composite types. Firstly, it triggered false positives for composite types unused in objects with storage. This was enoug

pgsql: Improve the check for pg_catalog.unknown data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.unknown data type in pg_upgrade The pg_upgrade check for pg_catalog.unknown type when upgrading from 9.6 had a couple of issues with domains and composite types - it detected even composite types unused in objects with storage. So for example this was enough to tri

pgsql: Improve the check for pg_catalog.line data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.line data type in pg_upgrade The pg_upgrade check for pg_catalog.line data type when upgrading from 9.3 had a couple of issues with domains and composite types. Firstly, it triggered false positives for composite types unused in objects with storage. This was enoug

pgsql: Improve the check for pg_catalog.unknown data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.unknown data type in pg_upgrade The pg_upgrade check for pg_catalog.unknown type when upgrading from 9.6 had a couple of issues with domains and composite types - it detected even composite types unused in objects with storage. So for example this was enough to tri

pgsql: Improve the check for pg_catalog.line data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.line data type in pg_upgrade The pg_upgrade check for pg_catalog.line data type when upgrading from 9.3 had a couple of issues with domains and composite types. Firstly, it triggered false positives for composite types unused in objects with storage. This was enoug

pgsql: Improve the check for pg_catalog.line data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.line data type in pg_upgrade The pg_upgrade check for pg_catalog.line data type when upgrading from 9.3 had a couple of issues with domains and composite types. Firstly, it triggered false positives for composite types unused in objects with storage. This was enoug

pgsql: Improve the check for pg_catalog.unknown data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.unknown data type in pg_upgrade The pg_upgrade check for pg_catalog.unknown type when upgrading from 9.6 had a couple of issues with domains and composite types - it detected even composite types unused in objects with storage. So for example this was enough to tri

pgsql: Improve the check for pg_catalog.line data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.line data type in pg_upgrade The pg_upgrade check for pg_catalog.line data type when upgrading from 9.3 had a couple of issues with domains and composite types. Firstly, it triggered false positives for composite types unused in objects with storage. This was enoug

pgsql: Improve the check for pg_catalog.unknown data type in pg_upgrade

2019-10-16 Thread Tomas Vondra
Improve the check for pg_catalog.unknown data type in pg_upgrade The pg_upgrade check for pg_catalog.unknown type when upgrading from 9.6 had a couple of issues with domains and composite types - it detected even composite types unused in objects with storage. So for example this was enough to tri

pgsql: Replace alter_table.sql test usage of event triggers.

2019-10-16 Thread Andres Freund
Replace alter_table.sql test usage of event triggers. The test in 93765bd956b added an event trigger to ensure that the tested table rewrites do not get optimized away (as happened in the past). But doing so would require running the tests in isolation, as otherwise the trigger might also fire in

Re: pgsql: Fix table rewrites that include a column without a default.

2019-10-16 Thread Andres Freund
Hi, On 2019-10-10 17:16:08 -0400, Tom Lane wrote: > If you just want to verify that a rewrite happened or didn't happen, > seems like you could check whether the table's relfilenode changed. > > regression=# select relfilenode as oldfilenode from pg_class where relname = > 'rewrite_test' > regre

pgsql: Replace alter_table.sql test usage of event triggers.

2019-10-16 Thread Andres Freund
Replace alter_table.sql test usage of event triggers. The test in 93765bd956b added an event trigger to ensure that the tested table rewrites do not get optimized away (as happened in the past). But doing so would require running the tests in isolation, as otherwise the trigger might also fire in