Re: auto-reconnect: temp schemas, sequences, transactions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: auto-reconnect: temp schemas, sequences, transactions
Дата
Msg-id 23133.1304350346@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: auto-reconnect: temp schemas, sequences, transactions  (Marek Więckowski <wieckom@foxi.nl>)
Ответы Re: auto-reconnect: temp schemas, sequences, transactions
Список pgsql-general
Marek =?utf-8?q?Wi=C4=99ckowski?= <wieckom@foxi.nl> writes:
> But what happens with a db transaction upon disconnect? If I have (say, in c++
> code or a script):

> begin;
> query1;
> query2;
> query3;
> query4;
> query5;
> commit;

> (with possibly some extra c++ or script code in between queries), and
> somewhere at the time when query2 is being executed some other backend
> crashes; session gets disconnected and automatically connected: what would
> happen to next queries which would be executed by the external code (query3, 4
> and so on)? They would not be executed outside of db transaction, wouldn't
> they? I would hope that they all keep failing up until next commit/rollback or
> something similar...

Well, there will be no memory on the server side of any uncompleted
queries.  If the client-side logic tries to re-issue these queries
after re-connecting, it would be up to that logic to be careful about
what to reissue or not.  Possibly this is a question for the author
of your client library.

            regards, tom lane

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

Предыдущее
От: Marek Więckowski
Дата:
Сообщение: Re: auto-reconnect: temp schemas, sequences, transactions
Следующее
От: jgoulet
Дата:
Сообщение: Re: pipe line error (psql command)