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-08 23:46:03
Message-ID: CAEepm=3g6oS4Ko7t7+vorX5LSHMiyGXJHYor=2WigTAob2z3OQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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

Attachment Content-Type Size
copy-with-indexes-and-transitions.patch application/octet-stream 514 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2017-07-08 23:55:41 Re: COPY vs. transition tables
Previous Message Mark Rofail 2017-07-08 23:35:46 Re: GSoC 2017: Foreign Key Arrays