From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Karsten Hilbert <Karsten.Hilbert@gmx.net>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536
Date: Mon, 16 Mar 2020 13:29:53 -0700
Message-ID: <5C674AE5-1EB3-4B85-B1E6-DD06863BC554@anarazel.de> (raw)
In-Reply-To: <2292.1584390138@sss.pgh.pa.us>
References: <20200315182349.GL467@hermes.hilbert.loc>
<20200315192037.GM467@hermes.hilbert.loc>
<3b7214bd-d0b5-e66f-fd29-240f1eb56cdf@aklaver.com>
<20200315202100.GO467@hermes.hilbert.loc>
<537b5f42-efb7-6833-3c10-d2cf7cd05496@aklaver.com>
<20200315221433.GQ467@hermes.hilbert.loc>
<23239.1584317478@sss.pgh.pa.us>
<20200316194453.tf3dlgovim6lpfbc@alap3.anarazel.de>
<20200316195307.sqksvjjngteh5lyj@alap3.anarazel.de>
<2292.1584390138@sss.pgh.pa.us>
Hi,
On March 16, 2020 1:22:18 PM PDT, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>Andres Freund <andres@anarazel.de> writes:
>> On 2020-03-16 12:44:53 -0700, Andres Freund wrote:
>>> On 2020-03-15 20:11:18 -0400, Tom Lane wrote:
>>>> I wonder if we should change it to allow that when
>>>> allow_system_table_mods is true? This isn't the first time we've
>>>> seen people need to be able to do surgery on a toast table.
>
>>> I'd be mildly in favor. But it's considerably more than just the
>>> executor check that'd need to change. We don't the right thing for
>toast
>>> relations in plenty places right now, because we just check for
>>> RELKIND_RELATION - which will break junkvars etc.
>
>> Hm, and I wonder if there could be problems with
>> HeapTupleSatisfiesToast() too? It doesn't really forsee much DML
>being
>> done.
>
>We've always allowed people to select from toast tables, so if there
>are planner or executor problems with that, I'd think they'd mostly be
>bugs that need fixed anyway. Your point about HeapTupleSatisfiesToast
>is better though.
The logic to add/extract junkvars for updated/deleted tables, as well as other parts of the modification code paths, weren't exposed so far though.
I've tried allowing updates/deletes before (at least deletes are needed to e.g handle duplicate values), I'm fairly confident that the junkvar issue is real.
Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, Karsten.Hilbert@gmx.net
Subject: Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536
In-Reply-To: <5C674AE5-1EB3-4B85-B1E6-DD06863BC554@anarazel.de>
References: <20200315182349.GL467@hermes.hilbert.loc> <20200315192037.GM467@hermes.hilbert.loc> <3b7214bd-d0b5-e66f-fd29-240f1eb56cdf@aklaver.com> <20200315202100.GO467@hermes.hilbert.loc> <537b5f42-efb7-6833-3c10-d2cf7cd05496@aklaver.com> <20200315221433.GQ467@hermes.hilbert.loc> <23239.1584317478@sss.pgh.pa.us> <20200316194453.tf3dlgovim6lpfbc@alap3.anarazel.de> <20200316195307.sqksvjjngteh5lyj@alap3.anarazel.de> <2292.1584390138@sss.pgh.pa.us> <5C674AE5-1EB3-4B85-B1E6-DD06863BC554@anarazel.de>
* 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