Re: COPY blocking \dt+? - Mailing list pgsql-general

From David Rowley
Subject Re: COPY blocking \dt+?
Date
Msg-id CAApHDvpUfigaNAOVaFeVPfWxfbRFsVwA7VoRezMZABG9Y_OZoQ@mail.gmail.com
Whole thread Raw
In response to COPY blocking \dt+?  (pinker <pinker@onet.eu>)
Responses Re: COPY blocking \dt+?
List pgsql-general
On Tue, 5 May 2020 at 13:05, pinker <pinker@onet.eu> wrote:
> I'm running standard pgbench and what's kinda strange copy pgbench_accounts
> from stdin is blocking my other query which is \dt+.
> Does copy hold any exclusive lock or there is something wrong with my
> system?

COPY does not. However, pgbench does TRUNCATE the tables before doing
the COPY, so that'll be most likely what's causing your query to get
blocked.

David



pgsql-general by date:

Previous
From: Jerry Sievers
Date:
Subject: Re: Temporary table has become problematically persistent
Next
From: pinker
Date:
Subject: Re: COPY blocking \dt+?