Re: pgbench with partitioned tables

From: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Sergey Tatarintsev <s(dot)tatarintsev(at)postgrespro(dot)ru>
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 07:57:21
Message-ID: 202502030757.muvzlswbtfuh@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-02-03 08:16:01 Re: Optimize scram_SaltedPassword performance
Previous Message Alvaro Herrera 2025-02-03 07:50:41 Re: NOT ENFORCED constraint feature