Re: COPY, lock release and MVCC
От
Laurenz Albe
Тема
Re: COPY, lock release and MVCC
Дата
Msg-id
ed6f3e0064abb75538439377750c8d2e7d82f9f0.camel@cybertec.at
Ответ на
Re: COPY, lock release and MVCC (Amit Kapila)
Список
Дерево обсуждения
COPY, lock release and MVCC Laurenz Albe <laurenz.albe@cybertec.at>
Re: COPY, lock release and MVCC Robert Haas <robertmhaas@gmail.com>
Re: COPY, lock release and MVCC Laurenz Albe <laurenz.albe@cybertec.at>
Re: COPY, lock release and MVCC Tom Lane <tgl@sss.pgh.pa.us>
Re: COPY, lock release and MVCC Laurenz Albe <laurenz.albe@cybertec.at>
Re: COPY, lock release and MVCC Amit Kapila <amit.kapila16@gmail.com>
Re: COPY, lock release and MVCC Laurenz Albe <laurenz.albe@cybertec.at>
Re: COPY, lock release and MVCC Amit Kapila <amit.kapila16@gmail.com>
Re: COPY, lock release and MVCC Laurenz Albe <laurenz.albe@cybertec.at>
Re: COPY, lock release and MVCC Amit Kapila <amit.kapila16@gmail.com>
Re: COPY, lock release and MVCC Laurenz Albe <laurenz.albe@cybertec.at>
On Wed, 2020-05-13 at 19:29 +0530, Amit Kapila wrote: > > > > > On Fri, May 8, 2020 at 4:58 AM Laurenz Albe 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: > > > > Here is a patch. > > > > - /* > - * Close the relation. If reading, we can release the AccessShareLock we > - * got; if writing, we should hold the lock until end of transaction to > - * ensure that updates will be committed before lock is released. > - */ > - if (rel != NULL) > - table_close(rel, (is_from ? NoLock : AccessShareLock)); > + table_close(rel, NoLock); > > I wonder why you have removed (rel != NULL) check? That was just unexcusable sloppiness, nothing more. Here is a fixed patch. Yours, Laurenz Albe
В списке pgsql-hackers по дате отправления