Hi all,
Following the issue with temp tables and 2PC, we thought that each
session in Postgres was supposed to generate a unique namespace for its
temporary tables.
But if we execute the following scenario:
*
First session*.
BEGIN;
CREATE TEMP TABLE foo (x int) ON COMMIT DROP;
PREPARE TRANSACTION 't1';
*Disconnect*.
*Wait* (at least until backend process for first session exits).
*Reconnect new session*.
CREATE TEMP TABLE foo (x int); <-- blocks until t1 commits
The issue we see is that a totally unrelated session (which should have
a unique temporary schema), reuses the temporary schema that is locked
away in the prepared transaction. Isn't that breaking the assumption
that each session should have a unique schema for its temp tables?
Thanks in advance for your insights.
Emmanuel
--
Emmanuel Cecchet
Aster Data Systems
Web: http://www.asterdata.com