From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wells Oliver <wells.oliver@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Odd pg dump error: cache lookup failure
Date: Tue, 25 Aug 2020 15:05:27 -0400
Message-ID: <2760667.1598382327@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOC+FBXXq_iDU9iFHUoL5F8PY8pZawiLQ1xuPq3VW9_RJcN0JQ@mail.gmail.com>
References: <CAOC+FBXosgRbSi-A+VLP8t5pmErEnP3M8aRJJ1z5HcyhvQM_eA@mail.gmail.com>
<20200824231338.GA30623@alvherre.pgsql>
<20200824231621.GA29590@tamriel.snowman.net>
<2748788.1598376276@sss.pgh.pa.us>
<CAOC+FBXXq_iDU9iFHUoL5F8PY8pZawiLQ1xuPq3VW9_RJcN0JQ@mail.gmail.com>
Wells Oliver <wells.oliver@gmail.com> writes:
> Interesting: the only parameters I pass are a list of excluded schemas via
> -N arguments, as well as a --format=c.
> I don't think anything in the excluded schemas is being referenced by
> something that is set to be dumped: is that what you're thinking? It's
> possible, and I'll dig a bit, but things are generally walled off pretty
> well.
I overlooked something in my previous quick code scan, which is that
flagInhTables() will set the "interesting" flag on parents of tables
that are due to be dumped, even if the parents are not. This *will*
result in running getIndexes on tables that we have no lock on.
However, it's not quite clear how that leads to the observed failure,
because if we have a lock on some child partition, it shouldn't really
be possible for someone to drop an index on the partition root,
should it? In any case you didn't admit to doing such things.
This theory would require both that a table-to-be-dumped is a
partition of some partitioned table that's in an excluded schema,
and that you're concurrently doing DDL on that partitioned table.
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, wells.oliver@gmail.com, sfrost@snowman.net, alvherre@2ndquadrant.com
Subject: Re: Odd pg dump error: cache lookup failure
In-Reply-To: <2760667.1598382327@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