Skip site navigation (1) Skip section navigation (2)

Re: Connection Pooling, a year later

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, mlw <markw(at)mohawksoft(dot)com>, owensmk(at)earthlink(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Pooling, a year later
Date: 2001-12-18 15:08:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> No problem, it is just that rollbacks when you are not in a transaction
> cause a log error message.

I don't see any difference in the behavior: you get a notice either way.

regression=# commit;
NOTICE:  COMMIT: no transaction in progress
regression=# rollback;
NOTICE:  ROLLBACK: no transaction in progress

My recommendation would generally be to do a ROLLBACK not a COMMIT, on
the grounds that if the previous user failed to complete his transaction
you probably want to abort it, not assume that it's safe to commit.

However, this safety-first approach might be unworkable if you have a
large body of existing code that all assumes it needn't issue COMMIT

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-12-18 15:12:57
Subject: Re: Connection Pooling, a year later
Previous:From: Tom LaneDate: 2001-12-18 15:04:08
Subject: Re: Bulkloading using COPY - ignore duplicates?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group