X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 62FF532B684 for ; Wed, 13 Oct 2004 02:03:26 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84099-05 for ; Wed, 13 Oct 2004 01:03:18 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id E678632B4B6 for ; Wed, 13 Oct 2004 02:03:20 +0100 (BST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id i9D12vN08023; Tue, 12 Oct 2004 21:02:57 -0400 (EDT) From: Bruce Momjian Message-Id: <200410130102.i9D12vN08023@candle.pha.pa.us> Subject: Re: Caching of Queries In-Reply-To: <20041007.161842.77062117.t-ishii@sra.co.jp> To: Tatsuo Ishii Date: Tue, 12 Oct 2004 21:02:57 -0400 (EDT) Cc: tgl@sss.pgh.pa.us, matt@ymogen.net, pg@rbt.ca, awerman2@hotmail.com, scottakirkwood@gmail.com, pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/171 X-Sequence-Number: 8647 Added to TODO: * Add RESET CONNECTION command to reset all session state This would include resetting of all variables (RESET ALL), dropping of all temporary tables, removal of any NOTIFYs, etc. This could be used for connection pooling. We could also change RESET ALL to have this functionality. --------------------------------------------------------------------------- Tatsuo Ishii wrote: > > Tatsuo Ishii writes: > > > First, it's not a particular problem with pgpool. As far as I know any > > > connection pool solution has exactly the same problem. Second, it's > > > easy to fix if PostgreSQL provides a functionarity such as:"drop all > > > temporary tables if any". > > > > I don't like that definition exactly --- it would mean that every time > > we add more backend-local state, we expect client drivers to know to > > issue the right incantation to reset that kind of state. > > > > I'm thinking we need to invent a command like "RESET CONNECTION" that > > resets GUC variables, drops temp tables, forgets active NOTIFYs, and > > generally does whatever else needs to be done to make the session state > > appear virgin. When we add more such state, we can fix it inside the > > backend without bothering clients. > > Great. It's much better than I propose. > > > I now realize that our "RESET ALL" command for GUC variables was not > > fully thought out. We could possibly redefine it as doing the above, > > but that might break some applications ... > > > > regards, tom lane > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073