Re: What happens when you run out of transaction ID's ??? - Mailing list pgsql-general

From Tom Lane
Subject Re: What happens when you run out of transaction ID's ???
Date
Msg-id 26587.1043855212@sss.pgh.pa.us
Whole thread Raw
In response to Re: What happens when you run out of transaction ID's ???  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
>> His code NEVER exited the WHILE statement so he kept on beginning over
>> and over again... After about 3-4 hours, postgreSQL would just go away.
>> I enabled some extended logging and restarted the data server....

Now that I think about it, 4 billion consecutive BEGINs (or a BEGIN
followed by 4 billion commands of any kind) would eventually hit the
CommandCounter wraparound limit.  This doesn't cause a crash though.
This is what it looks like in 7.2:

regression=# begin;
NOTICE:  BEGIN: already a transaction in progress
BEGIN
regression=# begin;
NOTICE:  BEGIN: already a transaction in progress
ERROR:  You may only have 2^32-1 commands per transaction
regression=# begin;
NOTICE:  current transaction is aborted, queries ignored until end of transaction block
*ABORT STATE*
regression=# begin;
NOTICE:  current transaction is aborted, queries ignored until end of transaction block
*ABORT STATE*
regression=# begin;

(No, I didn't really execute 4 billion begins, just twiddled the counter
with a debugger ...)

But Greg still hasn't told us exactly what undesirable behavior he's
seeing.

            regards, tom lane

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Rules for trigger execution
Next
From: Holger Klawitter
Date:
Subject: Re: Firewalls and Postgres