Project "Postgres-XC".
The branch, master has been updated
via 45617c6321fa7a95d0b062f0918c9d9935f7fe53 (commit)
from c2e5a081606b4dfaaa55e45a76d680b55b6bbc15 (commit)
- Log -----------------------------------------------------------------
commit 45617c6321fa7a95d0b062f0918c9d9935f7fe53
Author: Mason S <mas...@ma...>
Date: Wed May 19 19:06:10 2010 -0400
Fixed a bug when using a table after it had been created in the same
transaction but not committed. The problem was the location info
in relcache was not read in.
I just invalidated the entry immediately after creation to force it to
be created properly.
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index f74c05c..fa6456a 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -547,6 +547,8 @@ DefineRelation(CreateStmt *stmt, char relkind)
{
AddRelationDistribution (relationId, stmt->distributeby, inheritOids, descriptor);
CommandCounterIncrement();
+ /* Make sure locator info gets rebuilt */
+ RelationCacheInvalidateEntry(relationId);
}
#endif
-----------------------------------------------------------------------
Summary of changes:
src/backend/commands/tablecmds.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
hooks/post-receive
--
Postgres-XC
|