Re: COPY vs. transition tables

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Subject: Re: COPY vs. transition tables
Date: 2017-07-09 23:02:15
Message-ID: CAEepm=0YVDCYqrV8YCvPmLwJuy9qosH4OC4MmJzKq807JSXLUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jul 9, 2017 at 11:46 AM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Sat, Jul 8, 2017 at 8:42 PM, David Fetter <david(at)fetter(dot)org> wrote:
>> Using the script attached, I'm getting this very odd result set below.
>>
>> Audit records from COPY to the "foo bar" table aren't getting
>> recorded, but audit records from COPY to the baz table are.
>
> Thanks for the bug report. I think it's the presence of the index on
> "foo bar", not the space in its name (but thanks for that curve
> ball!), that causes these tuples not to be captured.
> CopyFromInsertBatch takes a different path depending on whether there
> are any indexes, and mistakenly passes NULL for transition_capture.
> The attached seems to fix it, but I'll look more closely and send a
> version with a regression test on Monday.

Here it is. Added to open items.

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
copy-with-indexes-and-transitions-v2.patch application/octet-stream 3.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Hernández Tortosa 2017-07-10 00:29:01 Re: Authentification method on client side checking
Previous Message Martin Mai 2017-07-09 20:21:27 Re: [PATCH] Minor typo in the source repository documentation