Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal)

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal)
Date: 2018-11-20 23:03:14
Message-ID: CAKJS1f_z51vF=TfdaafjXGTK2hfrwLSZvX6Sa5aCY9dBKQwEhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 20 Nov 2018 at 01:47, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-11-20 23:03:58 Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal)
Previous Message Alvaro Herrera 2018-11-20 22:48:39 Re: pgbench - doCustom cleanup