Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0SNS-00015L-FZ for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Sep 2018 14:13:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g0SNQ-0000NX-G9 for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Sep 2018 14:13:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0SNQ-0000NM-2N for pgsql-hackers@lists.postgresql.org; Thu, 13 Sep 2018 14:13:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0SNN-0004PB-IG for pgsql-hackers@postgresql.org; Thu, 13 Sep 2018 14:13:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w8DEDfQk010742; Thu, 13 Sep 2018 10:13:41 -0400 From: Tom Lane To: Amit Langote cc: Rajkumar Raghuwanshi , pgsql-hackers Subject: Re: Getting ERROR: could not open file "base/13164/t3_16388" with partition table with ON COMMIT In-reply-to: References: <2bf804fb-7417-4539-51c5-f6419f1e8741@lab.ntt.co.jp> <7193.1536768840@sss.pgh.pa.us> Comments: In-reply-to Amit Langote message dated "Thu, 13 Sep 2018 13:36:22 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10740.1536848021.1@sss.pgh.pa.us> Date: Thu, 13 Sep 2018 10:13:41 -0400 Message-ID: <10741.1536848021@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Langote writes: > On 2018/09/13 1:14, Tom Lane wrote: >> That seems excessively restrictive. Anything that has storage (e.g. >> matviews) ought to be truncatable, no? > Not by heap_truncate it seems. The header comment of heap_truncate says > that it concerns itself only with ON COMMIT truncation of temporary tables: Ah. Well, in that case I'm OK with just a simple test for RELKIND_RELATION, but I definitely feel that it should be inside heap_truncate. Callers don't need to know about the limited scope of what that does. regards, tom lane