Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46] (may be forged)) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f17KqKx01598 for ; Wed, 7 Feb 2001 15:52:20 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id PAA12110; Wed, 7 Feb 2001 15:50:53 -0500 (EST) From: Bruce Momjian Message-Id: <200102072050.PAA12110@candle.pha.pa.us> Subject: Re: PostgreSQL and PHP persistent connections In-Reply-To: <10029.981578961@sss.pgh.pa.us> "from Tom Lane at Feb 7, 2001 03:49:21 pm" To: Tom Lane Date: Wed, 7 Feb 2001 15:50:53 -0500 (EST) CC: "Thies C. Arntzen" , rasmus@php.net, PostgreSQL-interfaces X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200102/49 X-Sequence-Number: 1002 > Bruce Momjian writes: > > We discussed using 'ROLLBACK' before passing a connection to a new user, > > but the problem was that ROLLBACK with no open transaction causes a > > server log error message. We discussed adding 'ROLLBACK SILENT' to fix > > this, but I believe a better, more portable solution is a simple "BEGIN > > WORK;ROLLBACK". This will do nothing if there is no open transaction, > > How is that an improvement? It only changes the case in which you get > a NOTICE from not-in-transaction to in-transaction ... Well, the most common case is that you are not in a transaction. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026