Fix a long standing bug in vacuum/analyze of temp tables
authorPavan Deolasee <[email protected]>
Fri, 18 May 2018 06:16:17 +0000 (11:46 +0530)
committerPavan Deolasee <[email protected]>
Fri, 18 May 2018 06:16:17 +0000 (11:46 +0530)
commit63233568d6c4646882d97f8f4e87b35729d67846
tree0a3cab89421c29aff17c72c0c4241988aefd95e3
parent975cf8effe7469d1454695e463b4c604852fabfc
Fix a long standing bug in vacuum/analyze of temp tables

The system may and very likely choose different namespace for temporary tables
on different nodes. So it was erroneous to explicitly add the coordinator side
nampspace to the queries constructed for fetching stats from the remote nodes.
A regression test was non-deterministically failing for this reason for long,
but only now we could fully understand the problem and fix it. We now use
pg_my_temp_schema() to derive the current temporary schema used by the remote
node instead of hardcoding that in the query using coordinator side
information.
src/backend/commands/analyze.c
src/backend/commands/vacuum.c
src/test/regress/expected/inherit.out