X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 7232F92514D for ; Mon, 26 May 2003 12:44:07 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 26588-07 for ; Mon, 26 May 2003 12:44:06 -0400 (EDT) Received: from nocmailsvc001.allthesites.org (host201.cisp.cc [65.196.203.201]) by developer.postgresql.org (Postfix) with ESMTP id 78159925148 for ; Mon, 26 May 2003 12:44:06 -0400 (EDT) Received: from muskrat (unverified [65.129.104.25]) by copper.net (Rockliffe SMTPRA 5.2.5) with SMTP id ; Mon, 26 May 2003 12:44:01 -0400 From: "Dietmar May" To: "Tom Lane" Cc: Subject: Re: Race condition with libpq Date: Mon, 26 May 2003 12:49:38 -0400 Message-ID: <00a001c323a6$cbb02d90$fb02a8c0@muskrat> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Importance: Normal In-Reply-To: <2072.1053966616@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/74 X-Sequence-Number: 4192 Thanks Tom, > You're missing the point. It's the DROP that's failing, not the CREATE, > and it's failing because the old backend is still connected to the > victim database. Actually, I understand that it's the DROP that's failing. What I didn't understand is that connection closure was asynchronous, but everything else is synchronous. So, why can't the server-side code that closes the connection release any resources associated with that connection before the socket is closed? It seems that doing so could fix this problem quite cleanly. > [template1] is not used for any "internal" operations. It is > conventionally present so that clients have a standard place to > connect to. Perhaps I'm misunderstanding the manual - "4.1: When a new database is created, the template database [template1] is essentially cloned. This means that any changes you make in template1 are propagated to all subsequently created databases." Thanks again for your quick response, Dietmar