Re: [HACKERS] pgbench: Skipping the creating primary keys afterinitialization - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] pgbench: Skipping the creating primary keys afterinitialization
Date
Msg-id alpine.DEB.2.20.1709011627400.15423@lancre
Whole thread Raw
In response to Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization
List 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.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] [PATCH] Fix drop replication slot blocking instead ofreturning error