Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marek =?utf-8?q?Wi=C4=99ckowski?= <wieckom@xxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux