Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi6M0-0004bY-1r for pgsql-jdbc@arkaria.postgresql.org; Wed, 07 May 2014 18:14:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wi6Lz-0002er-CC for pgsql-jdbc@arkaria.postgresql.org; Wed, 07 May 2014 18:14:03 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi6Lw-0002a2-8L for pgsql-jdbc@postgresql.org; Wed, 07 May 2014 18:14:00 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi6Lt-0006P9-AF for pgsql-jdbc@postgresql.org; Wed, 07 May 2014 18:13:59 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Wi6Ls-0001iV-KU for pgsql-jdbc@postgresql.org; Wed, 07 May 2014 11:13:56 -0700 Date: Wed, 7 May 2014 11:13:56 -0700 (PDT) From: David G Johnston To: pgsql-jdbc@postgresql.org Message-ID: <1399486436626-5803003.post@n5.nabble.com> In-Reply-To: References: Subject: Re: temp table problem due to thread concurrency ( ERROR: could not open file "base/ ) ? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 3.5 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Why cannot you just: Open Connection Begin; Create TEMP Tables Do stuff with TEMP Tables Commit; Close Connection (auto-drops TEMP tables) Also, figuring out if you code is broken is much easier if we can actually see the code; describing it only in plain English doesn't usually result in people providing useful answers. Both code and description are usually needed. Temporary tables are session-local and so as long as you do not actively share a connection dropping temporary tables and these kinds of concurrency errors should be impossible. Since you are seeing them, and you feel the need to drop temporary tables, either you are doing things wrong or at minimum doing unnecessary work. Server processes (PostgreSQL is process, not thread, based) are connection (and thus session) oriented. Client threads/processes are whatever you tell your code to do; connections themselves are not inherently thread-safe so if you are multi-threading and sharing connections you are doing something highly discouraged and, given the errors, are doing so incorrectly. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/temp-table-problem-due-to-thread-concurrency-ERROR-could-not-open-file-base-tp5802963p5803003.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc