Re: pgbench with partitioned tables - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: pgbench with partitioned tables
Date
Msg-id CAA5RZ0sP4X=D484AmQ9V0wBtAVnwUTcyC8okSBjhiqwLd=ov5w@mail.gmail.com
Whole thread Raw
In response to Re: pgbench with partitioned tables  (Álvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
I was looking at the comments [1] for why COPY FREEZE is
not allowed on a parent table, and it was mainly due
to having to open up partitions to check if they are able
to take the optimization (table created or truncated in the
current transaction ). Obviously as the number of
partitions grow, it will take more to perform these
checks. My suspicious is that in the cases in which partitions
are used, the benefits of COPY FREEZE could outweigh
the overhead of these additional checks.

So while we could try to solve the COPY FREEZE issue
specifically for pgbench, I wonder if we should try to do better
and see if the limitation on a parent partition can be removed.

I can provide a patch and some benchmark numbers unless
there is something bigger I am missing about the reason this
limitation exists?


[1] https://github.com/postgres/postgres/blob/master/src/backend/commands/copyfrom.c#L727-L735

Regards,

Sami



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
Next
From: Michel Pelletier
Date:
Subject: Re: Using Expanded Objects other than Arrays from plpgsql