From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions? |
Date: | 2020-02-24 23:19:58 |
Message-ID: | E4B5F356-1B06-4181-8F68-2A914A9C5A2B@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 23 Feb 2020, at 08:27, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Sat, Feb 22, 2020 at 10:22:27PM +0100, Daniel Gustafsson wrote:
>> Turns out that we in heap_multi_insert missed to call log_heap_new_cid for the
>> first tuple inserted, we only do it in the loop body for the subsequent ones.
>> With the attached patch, the v6 of this patch posted upthead pass the tests for
>> me. I have a v7 brewing which I'll submit shortly, but since this fix
>> unrelated to that patchseries other than as a pre-requisite I figured I'd post
>> that separately.
>
> Good catch. I would not backpatch that as it is not a live bug
> because heap_multi_insert() is not used for catalogs yet. With your
> patch, that would be the case though..
I'll leave that call up to others, the bug is indeed unreachable with the
current coding.
Attached is a v7 of the catalog multi_insert patch which removes some code
duplication which was previously commented on. There are still a few rouch
edges but this version passes tests when paired with the heap_multi_insert cid
patch.
cheers ./daniel
Attachment | Content-Type | Size |
---|---|---|
catalog_multi_insert-v7.patch | application/octet-stream | 56.7 KB |
heap_multi_insert_cid.patch | application/octet-stream | 985 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2020-02-24 23:22:21 | Re: Error on failed COMMIT |
Previous Message | Merlin Moncure | 2020-02-24 22:59:37 | Re: Error on failed COMMIT |