Re: Expanding HOT updates for expression and partial indexes
От | Jeff Davis |
---|---|
Тема | Re: Expanding HOT updates for expression and partial indexes |
Дата | |
Msg-id | ea98b11380557874a7bf3a577146786df8ec1da1.camel@j-davis.com обсуждение исходный текст |
Ответ на | Re: Expanding HOT updates for expression and partial indexes (Greg Burd <greg@burd.me>) |
Ответы |
Re: Expanding HOT updates for expression and partial indexes
|
Список | pgsql-hackers |
On Tue, 2025-10-07 at 17:36 -0400, Greg Burd wrote: > After reviewing how updates work in the executor, I discovered that > during execution the new tuple slot is populated with the information > from ExecBuildUpdateProjection() and the old tuple, but that most > importantly for this use case that function created a bitmap of the > modified columns (the columns specified in the update). This bitmap > isn't the same as the one produced by HeapDetermineColumnsInfo() as > the > latter excludes attributes that are not changed after testing > equality > with the helper function heap_attr_equals() where as the former will > include attributes that appear in the update but are the same value > as > before. This, happily, is immaterial for the purposes of my function > ExecExprIndexesRequireUpdates() which simply needs to check to see if > index tuples generated are unchanged. So I had all I needed to run > the > checks ahead of acquiring the lock on the buffer. You're still calling ExecExprIndexesRequireUpdates() from within heap_update(). Can't you do that inside of ExecUpdatePrologue() or thereabouts? Regards, Jeff Davis
В списке pgsql-hackers по дате отправления: