From: | Marek Więckowski <wieckom(at)foxi(dot)nl> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | auto-reconnect: temp schemas, sequences, transactions |
Date: | 2011-05-02 07:35:33 |
Message-ID: | 201105020935.33628.wieckom@foxi.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
If I understand correctly, Tom's reply in:
http://archives.postgresql.org/pgsql-general/2007-06/msg01668.php suggests
that temp schemas are kept when a session gets disconnected because
connections get automatically re-established with the same backend id, and if
this succeeds the old temp tables get picked up by the new connection as if
there was no disconnection at all.
However, it seems that the same does not happen for currval of sequences? This
is quite inconvenient, I must say (in some situations our re-established
connection is basically useless... and it even does not "know" about it...).
For my information: what happens if the disconnect (due to another client
process dying) happened during a transaction? After reconnect are we again in
the middle of the previous transaction? (Or does something else happen, e.g.
the transaction continues until "commit" and only then the session actually
disconnects?) I'm anxiously assuming that it's not like the next queries after
reconnection will happily be executed outside of a transaction, but I haven't
found much (recent) info on the subject.
Best,
~Marek
=# select version();
version
---------------------------------------------------------------------------------------
PostgreSQL 8.4.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
4.4.4, 64-bit
(1 row
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2011-05-02 09:50:22 | Re: pervasiveness of surrogate (also called synthetic) keys |
Previous Message | Mark Morgan Lloyd | 2011-05-02 06:31:27 | Re: Postgresql, PSN hack and table limits |