Re: COPY blocking \dt+?

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: pinker <pinker(at)onet(dot)eu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY blocking \dt+?
Date: 2020-05-05 03:01:33
Message-ID: CAApHDvr9mjOG7Rz+=QKqYW1TdCoWoGOMFxUqA8w+du-HxpEw1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 5 May 2020 at 14:50, pinker <pinker(at)onet(dot)eu> wrote:
> So it would need to run inside single transaction to cause lock, right? do
> you know if pgbench is opening transaction?

The TRUNCATE and COPY are done in the same transaction. You can see
the code in https://github.com/postgres/postgres/blob/REL_11_6/src/bin/pgbench/pgbench.c#L3599

David

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean Claude 2020-05-05 07:07:59 Migration from Oracle to Postgres
Previous Message pinker 2020-05-05 02:50:26 Re: COPY blocking \dt+?