From: | Emmanuel Cecchet <manu(at)asterdata(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Unique namespace per session for temp tables? |
Date: | 2009-06-05 23:06:22 |
Message-ID: | 4A29A4EE.3030002@asterdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-05 23:13:43 | Re: Using results from DELETE ... RETURNING |
Previous Message | Merlin Moncure | 2009-06-05 23:03:52 | Re: Using results from DELETE ... RETURNING |