From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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: Mon, 5 Nov 2018 16:37:25 -0300
Message-ID: <20181105193725.4eluxe3xsewr65iu@alvherre.pgsql> (raw)
In-Reply-To: <0fe0f5d6-0603-2aa3-00cb-72569a9be0a1@lab.ntt.co.jp>
On 2018-Nov-02, Amit Langote wrote:
> Well, performDeletion *does* drop the child, because when the parent is
> dropped due to its ON COMMIT DROP action, it's done using:
>
> /*
> * Since this is an automatic drop, rather than one
> * directly initiated by the user, we pass the
> * PERFORM_DELETION_INTERNAL flag.
> */
> performDeletion(&object,
> DROP_CASCADE, PERFORM_DELETION_INTERNAL);
>
> Note the DROP_CASCADE, which means its children will be deleted as part of
> this.
I think this code should collect all the OIDs to be dropped, then use a
single performMultipleDeletions() at the end, after the heap_truncate
call is done. That seems better to me than a relkind check.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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: alvherre@2ndquadrant.com, Langote_Amit_f8@lab.ntt.co.jp, michael@paquier.xyz, tgl@sss.pgh.pa.us, 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: <20181105193725.4eluxe3xsewr65iu@alvherre.pgsql>
* 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