Hi!

> 10 дек. 2018 г., в 0:25, Alexander Korotkov <aekorot...@gmail.com> написал(а):
>> 
>> There's a patch above in this thread 
>> 0001-Use-correct-locking-protocol-during-GIN-posting-tree.patch where I 
>> propose stamping every deleted page with GinPageSetDeleteXid(page, 
>> ReadNewTransactionId()); and avoid reusing the page before 
>> TransactionIdPrecedes(GinPageGetDeleteXid(page), RecentGlobalDataXmin).
>> Should we leave alone this bug for future fixes to keep current fix 
>> noninvasive?
> 
> I think since is separate bug introduced in PostgreSQL 9.4, which
> should be backpatched with separate commit.  Could you please extract
> patch dealing with GinPageSetDeleteXid() and GinPageGetDeleteXid().
> The rest of work made in your patch should be considered for master.

PFA this part. In thread about GiST vacuum Heikki was not very happy with 
reusing PageHeader->pd_prune_xid for this. But we somewhat concluded that this 
might be OK.
Anyway, there's whole page, we can store those bits anywhere.

> BTW, what do you think about locking order in ginRedoDeletePage()?  Do
> you have any explanation of current behavior?
It seems to me that locking order must be left->deleted->parent.

Best regards, Andrey Borodin.

Reply via email to