From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: buschmann@nidsa.net
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12
Date: Thu, 10 Oct 2019 18:33:50 +0200
Message-ID: <20191010163350.2rtcjtje6tkgilqi@development> (raw)
In-Reply-To: <30706.1570717152@sss.pgh.pa.us>
References: <20191009132436.uugh4r3be6vw6ex4@development>
<20191009135907.km2b5nrzflcz6xey@development>
<20191009141841.my6k44wfiaquj3ks@development>
<20191009230759.ge66neof5qj627a2@development>
<19314.1570663125@sss.pgh.pa.us>
<20191009232836.jg77wccqwy5fgs6s@development>
<20265.1570664514@sss.pgh.pa.us>
<20191010014813.3b2btmkakhrskwgd@alap3.anarazel.de>
<20191010134303.bkwjzchjb2w66iro@development>
<30706.1570717152@sss.pgh.pa.us>
On Thu, Oct 10, 2019 at 10:19:12AM -0400, Tom Lane wrote:
>Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
>> Fair enough, attached is a patch doing that, I think. Maybe the file
>> should be named differently, as it contains other objects than just
>> tables.
>
>Seems about right, though I notice it will not detect domains over
>sql_identifier. How much do we care about that?
>
>To identify such domains, I think we'd need something like
>WHERE attypid IN (recursive-WITH-query), which makes me nervous.
>We did support those starting with 8.4, which is as far back as
>pg_upgrade will go, so in theory it should work. But I think we
>had bugs with such cases in old releases. Do we want to assume
>that the source server has been updated enough to avoid any such
>bugs? The expense of such a query might be daunting, too.
>
Not sure.
Regarding bugs, I think it's fine to assume the users are running
sufficiently recent version - they may not, but then they're probably
subject to various other bugs (data corruption, queries). If they're
not, then they'll either get false positives (in which case they'll be
forced to update) or false negatives (which is just as if we did
nothing).
For the query cost, I think we can assume the domain hierarchies are not
particularly deep (in practice I'd expect just domains directly on the
sql_identifier type). And I doubt people are using that very widely,
it's probably more like this report - ad-hoc CTAS, so just a couple of
items. So I wouldn't expect it to be a huge deal in most cases. But even
if it takes a second or two, it's a one-time cost.
regards
--
Tomas Vondra http://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-bugs@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, tgl@sss.pgh.pa.us, andres@anarazel.de, buschmann@nidsa.net, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12
In-Reply-To: <20191010163350.2rtcjtje6tkgilqi@development>
* 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