Re: pgbench: Skipping the creating primary keys after initialization

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench: Skipping the creating primary keys after initialization
Date: 2017-09-01 14:29:04
Message-ID: alpine.DEB.2.20.1709011627400.15423@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> I'm wondering whether this truncation should be yet another available
>> command? Hmmm... maybe not.
>
> Currently TRUNCATE pgbench_accounts command is executed within a
> transaction started immediately before it. If we move it out of the
> transaction, the table data will be truncated even if the copying data
> failed. Maybe we can do TRUNCATE pgbench_accounts, pgbench_history
> instead. Thought?

Keep the truncate in the transaction, and truncate both (or all?) tables
together.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-09-01 14:31:17 Re: [PATCH] Fix drop replication slot blocking instead of returning error
Previous Message Tom Lane 2017-09-01 14:19:35 Re: [bug fix] Savepoint-related statements terminates connection