public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: Sergey Tatarintsev <[email protected]>
Cc: Melanie Plageman <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: pgbench with partitioned tables
Date: Mon, 3 Feb 2025 08:57:21 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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/






view thread (2+ messages)

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgbench with partitioned tables
  In-Reply-To: <[email protected]>

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

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