Re: An out-of-date comment in nodeIndexonlyscan.c

Поиск
Список
Период
Сортировка
От Ashwin Agrawal
Тема Re: An out-of-date comment in nodeIndexonlyscan.c
Дата
Msg-id CALfoeisew28raDDufQVUMUuhUhrQC5mTfWWr6+L9EvLQLjyh6w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: An out-of-date comment in nodeIndexonlyscan.c  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: An out-of-date comment in nodeIndexonlyscan.c  (Thomas Munro <thomas.munro@gmail.com>)
Re: An out-of-date comment in nodeIndexonlyscan.c  (Thomas Munro <thomas.munro@gmail.com>)
Re: An out-of-date comment in nodeIndexonlyscan.c  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Thu, Jun 27, 2019 at 4:33 PM Thomas Munro <thomas.munro@gmail.com> wrote:
Here's a patch I'd like to commit to fix the comment.  We could look
at improving the actual code after
https://commitfest.postgresql.org/23/2169/ is done.

Change looks good to me.
 
I wonder if it might be possible to avoid page locks on both the heap
*and* index in some limited cases, as I mentioned over here (just an
idea, could be way off base):

https://www.postgresql.org/message-id/CA%2BhUKGJGDVfhHmoUGzi-_J%2BN8FmRjmWTY0MCd1ZV5Fj9qdyb1w%40mail.gmail.com

I am in same boat as you. One can get serializable conflict error today based on tuple gets HOT updated or not. HOT is logically internal code optimization and not so much user functionality, so ideally feels shouldn't affect serializable behavior. But it does currently, again, due to index locking. Disable HOT update and 4 isolation tests fail due to "could not serialize access due to read/write dependencies among transactions" otherwise not. If the tuple happens to fit on same page user will not get the error, if the tuple gets inserted to different page the error can happen, due to index page locking. I had discussed this with Heikki and thinking is we shouldn't need to take the lock on the index page, if the index key was not changed, even if it was a non-HOT update. Not sure of complications and implications, but just a thought.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Adam Berlin
Дата:
Сообщение: C testing for Postgres
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Usage of epoch in txid_current