From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Getting ERROR: could not open file "base/13164/t3_16388" with partition table with ON COMMIT
Date: Wed, 12 Sep 2018 12:14:00 -0400
Message-ID: <7193.1536768840@sss.pgh.pa.us> (raw)
In-Reply-To: <2bf804fb-7417-4539-51c5-f6419f1e8741@lab.ntt.co.jp>
References: <CAKcux6mhgcjSiB_egqEAEFgX462QZtncU8QCAJ2HZwM-wWGVew@mail.gmail.com>
<2bf804fb-7417-4539-51c5-f6419f1e8741@lab.ntt.co.jp>
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
> The infamous missing-relkind-check in heap_truncate() seems to be behind
> this. Perhaps, a patch like the attached will do?
That seems excessively restrictive. Anything that has storage (e.g.
matviews) ought to be truncatable, no?
I thought we had a macro or utility function somewhere that knew which
relkinds have storage, though I can't find it right now. I'd be
inclined to instantiate that if it doesn't exist, and then the code
here ought to read something like
if (RelkindHasStorage(rel->rd_rel->relkind))
heap_truncate_one_rel(rel);
Also, possibly the test ought to be inside heap_truncate_one_rel
rather than its callers?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, Langote_Amit_f8@lab.ntt.co.jp, rajkumar.raghuwanshi@enterprisedb.com
Subject: Re: Getting ERROR: could not open file "base/13164/t3_16388" with partition table with ON COMMIT
In-Reply-To: <7193.1536768840@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox