Re: pgbench with partitioned tables

From: Sergey Tatarintsev <s(dot)tatarintsev(at)postgrespro(dot)ru>
To: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench with partitioned tables
Date: 2025-02-03 12:23:16
Message-ID: 2a431a37-aa8b-478d-8732-e98a2dbf8580@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

03.02.2025 14:57, Álvaro Herrera пишет:
> On 2025-Feb-03, Sergey Tatarintsev wrote:
>
>> Thanks for the note. I changed the query in the patch (v2 patch attached)
>>
>> Btw, an additional benefit from the patch is that we can use foreign tables
>> (for example, to test postgres_fdw optimizations)
> Good thought, and maybe it would be better if the new function was
> "get_table_relkind" which just returns the char, and this check
>
>> + /* Use COPY with FREEZE on v14 and later for all regular tables */
>> + if ((PQserverVersion(con) >= 140000) && is_regular_table(con, table))
>> copy_statement_fmt = "copy %s from stdin with (freeze on)";
> can be "&& get_table_relkind(con, table) == RELKIND_RELATION"
>
> which I think is more natural.
>
sounds reasonable.

patch v3 attached

--
With best regards,
Sergey Tatarintsev,
PostgresPro

Attachment Content-Type Size
v3-0001-Fix-pgbench-client-side-data-generation-for.patch text/x-patch 2.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yuki Seino 2025-02-03 12:30:42 Re: Add “FOR UPDATE NOWAIT” lock details to the log.
Previous Message Dmitry Koterov 2025-02-03 12:21:23 Re: Increased work_mem for "logical replication tablesync worker" only?