Re: COPY, lock release and MVCC

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY, lock release and MVCC
Date: 2020-05-11 19:43:17
Message-ID: CA+TgmoYYTBXu_Jh=-B5yS++5t=LXT_7N=Ab3T21Z87TZ5ndGGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 8, 2020 at 4:58 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> I happened to notice that COPY TO releases the ACCESS SHARE lock
> on the table right when the command ends rather than holding it
> until the end of the transaction:

That seems inconsistent with what an INSERT statement would do, and thus bad.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2020-05-11 19:46:32 Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES)
Previous Message Robert Haas 2020-05-11 19:35:51 Re: No core file generated after PostgresNode->start