Re: Using indexUnchanged with nbtree
От | Peter Geoghegan |
---|---|
Тема | Re: Using indexUnchanged with nbtree |
Дата | |
Msg-id | CAH2-Wzk=wDTQkGziWSaJy67hVhG9_zh7RP6AkAr+tubtGfo1Jw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Using indexUnchanged with nbtree (Simon Riggs <simon.riggs@enterprisedb.com>) |
Ответы |
Re: Using indexUnchanged with nbtree
|
Список | pgsql-hackers |
On Thu, Jun 24, 2021 at 5:39 AM Simon Riggs <simon.riggs@enterprisedb.com> wrote: > This case occurs when we are doing non-HOT UPDATEs. That command is > searched, so the scan will already have touched the heap and almost > certainly the index also, setting any LP_DEAD bits already in the most > frequent case. But it won't, because the restriction that I described with non-HOT updates in kill_prior_tuple in that old thread I linked to. This has been the case since commit 2ed5b87f96d from Postgres 9.5. This probably should probably be fixed, somehow, but for now I don't think you can assume anything about LP_DEAD bits being set -- they're clearly not set with a non-HOT update when the UPDATE's ModifyTable node is fed by a scan of the same index (unless we reach _bt_check_unique() because it's a unique index). -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: