pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Limit pgbench COPY FREEZE to ordinary relations
Date: Tue, 11 Feb 2025 21:54:04 +0000
Message-ID: <E1thyCi-006cdx-2G@gemulon.postgresql.org> (raw)

Limit pgbench COPY FREEZE to ordinary relations

pgbench client-side data generation uses COPY FREEZE to load data for most
tables. COPY FREEZE isn't supported for partitioned tables and since pgbench
only supports partitioning pgbench_accounts, pgbench used a hard-coded check to
skip COPY FREEZE and use plain COPY for a partitioned pgbench_accounts.

If the user has manually partitioned one of the other pgbench tables, this
causes client-side data generation to error out with:

ERROR:  cannot perform COPY FREEZE on a partitioned table

Fix this by limiting COPY FREEZE to ordinary tables (RELKIND_RELATION).

Author: Sergey Tatarintsev <s.tatarintsev@postgrespro.ru>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/flat/97f55fca-8a7b-4da8-b413-7d1c57010676%40postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d0d649e91685081e6c5334d6d01ab4cd735b397d

Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml |  9 ++++-----
src/bin/pgbench/pgbench.c     | 41 +++++++++++++++++++++++++++++++----------
2 files changed, 35 insertions(+), 15 deletions(-)



Message-ID: <E1thyCi-006cdx-2G@gemulon.postgresql.org>
Permalink:  ../E1thyCi-006cdx-2G@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1thyCi-006cdx-2G@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Limit pgbench COPY FREEZE to ordinary relations
  In-Reply-To: <E1thyCi-006cdx-2G@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox