pgbench using COPY FREEZE
pgbench -i should use COPY FREEZE, patch attached.
--
Simon Riggs http://www.EnterpriseDB.com/
Attachments:
pgbench_copy_freeze.v1.patchapplication/octet-stream; name=pgbench_copy_freeze.v1.patchDownload
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index dc84b7b9b7..feb8f601ce 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -4162,7 +4162,11 @@ initGenerateDataClientSide(PGconn *con)
/*
* accounts is big enough to be worth using COPY and tracking runtime
*/
- res = PQexec(con, "copy pgbench_accounts from stdin");
+ resetPQExpBuffer(&sql);
+ appendPQExpBufferStr(&sql, "copy pgbench_accounts from stdin");
+ if (partitions == 0)
+ appendPQExpBufferStr(&sql, " with (freeze)");
+ res = PQexec(con, sql.data);
if (PQresultStatus(res) != PGRES_COPY_IN)
{
pg_log_fatal("unexpected copy in result: %s", PQerrorMessage(con));
Hello Simon,
Indeed.
There is already a "ready" patch in the queue, see:
https://commitfest.postgresql.org/33/3034/
--
Fabien.
On Thu, Jun 24, 2021 at 7:15 PM Fabien COELHO <coelho@cri.ensmp.fr> wrote:
Hello Simon,
Indeed.
There is already a "ready" patch in the queue, see:
Ah, my bad. I withdraw this patch, apologies Tatsuo-san.
--
Simon Riggs http://www.EnterpriseDB.com/
Hi Simon,
Hello Simon,
Indeed.
There is already a "ready" patch in the queue, see:
Ah, my bad. I withdraw this patch, apologies Tatsuo-san.
No problem at all. Thank you for looking into the issue.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp