Fix a long standing bug in vacuum/analyze of temp tables
authorPavan Deolasee <pavan.deolasee@gmail.com>
Fri, 18 May 2018 06:16:17 +0000 (11:46 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Mon, 21 May 2018 06:28:10 +0000 (11:58 +0530)
commitd2e36d864699c8b43e0205bfcc04f7ffb8cd6f14
tree8e3b656dd6c94c0283c4233dd417a2f3dc5ad513
parentcd808dfce15282712fd7ca3c022feda07cbcc4ce
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