Re: COPY, lock release and MVCC

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-05-14T09:41:34Z
Lists: pgsql-hackers

Attachments

On Thu, May 14, 2020 at 2:06 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> > I wonder why you have removed (rel != NULL) check?
>
> That was just unexcusable sloppiness, nothing more.
>

LGTM.  I have slightly modified the commit message, see if that looks
fine to you.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Commits

  1. Make COPY TO keep locks until the transaction end.

  2. COPY to a relation should keep write lock till transaction commit.

  3. Mega-commit to make heap_open/heap_openr/heap_close take an