Concurrent HOT Update interference
От | Simon Riggs |
---|---|
Тема | Concurrent HOT Update interference |
Дата | |
Msg-id | CA+U5nMKzsjwcpSoqLsfqYQRwW6udPtgBdqXz34fUwaVfgXKWhA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Concurrent HOT Update interference
Re: Concurrent HOT Update interference Re: Concurrent HOT Update interference |
Список | pgsql-hackers |
Currently, when we access a buffer for a HOT update we check to see if its possible to get a cleanup lock so we can clean the buffer. Currently, UPDATEs and DELETEs pin buffers during the scan phase and then re-lock the buffer to update. So what we have is that multiple UPDATEs repeatedly accessing the same block will prevent each other from successful cleanup, since while one session is performing the update, the second session is pinning the block with an indexscan. This effect has been noted for some time during pgbench runs, where running with more sessions than scale factors causes contention. We've never done anything about it because that's been seen as a poorly executed test, whereas it does actually match the real situation we experience at "hot spots" in the table. Holding the buffer pin across both scan and update saves effort for a single session, but it also causes bloat in the concurrent case. Or put another way, HOT is not effective at "hot spots" in a table! I thought I'd raise the problem first before attempting to propose a solution. (And also: why is index_fetch_heap() in indexam.c, yet bitgetpage() in executor/nodeBitmapHeapscan.c?) Comments? --Simon Riggs http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: