Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal) - Mailing list pgsql-hackers

From David Rowley
Subject Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal)
Date
Msg-id CAKJS1f_z51vF=TfdaafjXGTK2hfrwLSZvX6Sa5aCY9dBKQwEhg@mail.gmail.com
Whole thread Raw
In response to Re: heap_sync seems rather oblivious to partitioned tables(wal_level=minimal)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On Tue, 20 Nov 2018 at 01:47, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
> The patch seems fine to me.

Thanks for looking at it.

> It's a bit unfortunate that we simply disable the optimization on
> partitioned tables instead of fixing it somehow, but I guess it's better
> than nothing and no one has a very good idea how to make it work.

Yeah, I agree.  I added various comments in the patch to explain why
we're not going to the trouble of allowing it. I had hoped that would
do for now.  Lately, there's quite a bit of effort going into reducing
various overheads to having a partitioned table with high numbers of
partitions. A patch to speed up INSERT was just committed, for
example.  Perhaps COPY is less critical to make faster for inserting
small numbers of rows, but I'd not rule out someone complaining
sometime about the overhead of checking all partitions are compatible
with the freeze optimisation before doing the COPY, although, perhaps
we can just tell those people not to use the FREEZE option.

Anyway, I was mostly interested in fixing the bug.  Making COPY FREEZE
work with partitioned tables sounds like a new feature.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgbench - doCustom cleanup
Next
From: David Rowley
Date:
Subject: Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal)