Re: Patch for bug #17056 fast default on non-plain table

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Patch for bug #17056 fast default on non-plain table
Date: 2021-06-17 15:52:30
Message-ID: b1256185-43ee-a699-b286-e98a1d0c8d08@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 6/17/21 11:13 AM, Andrew Dunstan wrote:
> On 6/17/21 11:05 AM, Tom Lane wrote:
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> Here's a patch I propose to apply to fix this bug (See
>>> <https://www.postgresql.org/message-id/flat/759e997e-e1ca-91cd-84db-f4ae963fada1%40dunslane.net#b1cf11c3eb1f450bed97c79ad473909f>)
>> If I'm reading the code correctly, your change in RelationBuildTupleDesc
>> is scribbling directly on the disk buffer, which is surely not okay.
>> I don't understand why you need that at all given the other defenses
>> you added ... but if you need it, you have to modify the tuple AFTER
>> copying it.
>
> OK, will fix. I think we do need it (See Andres' comment in the bug
> thread). It should be a fairly simple fix.
>
>

revised patch attached.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
0001-Don-t-set-a-fast-default-for-anything-but-a-plain-ta-2.patch text/x-patch 6.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-06-17 15:56:49 Re: Fix for segfault in logical replication on master
Previous Message Fabien COELHO 2021-06-17 15:46:47 Re: pgbench logging broken by time logic changes