Re: What happens when you run out of transaction ID's ???

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Greg Patnude <GPatnude(at)hotmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: What happens when you run out of transaction ID's ???
Date: 2003-01-29 07:02:59
Message-ID: 20030128230102.V4312-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 28 Jan 2003, Greg Patnude wrote:

> What the problem was seemed to be this:
>
> I have a co-programmer who was working on a web-based system that runs
> against a separate database on a dedicated postgreSQL 7.2.1 / FreeBSD
> 4.6 / Apache server...
>
> He had created a "login" routine that basically did this:
>
> BEGIN
>
> while {
>
> --> BEGIN
>
> }
>
> END
>
> 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....
>
> A couple days later -- it happened again and the server quit... I looked
> in the logs and saw begin transaction and transaction ID's up around
> 2,147,000,000 before postgreSQL quit -- I figured that his error was
> basically running postgreSQL out of transaction ID's -- It never got a
> commit or rollback.... Just 2 bzillion BEGIN's inside the WHILE loop...
>
> I am looking for some daily affirmation that my diagnosis was on
> track...

I can't say for 7.2 (have access to one at work but not home), but on my
dev 7.4 box, a sequence of 100000 begins followed by a single end doesn't
seem to drive up the transaction id counter since my next transaction
isn't offset by that number. I'll check at work tomorrow if noone else
jumps in before then.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-01-29 07:14:16 Re: need much better query perfomance
Previous Message Dennis Gearon 2003-01-29 07:02:18 crypt