auto-reconnect: temp schemas, sequences, transactions

Поиск
Список
Период
Сортировка
От Marek Więckowski
Тема auto-reconnect: temp schemas, sequences, transactions
Дата
Msg-id 201105020935.33628.wieckom@foxi.nl
обсуждение исходный текст
Ответы Re: auto-reconnect: temp schemas, sequences, transactions
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Mark Morgan Lloyd
Дата:
Сообщение: Re: Postgresql, PSN hack and table limits
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pervasiveness of surrogate (also called synthetic) keys