From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Question about building an exportable snapshop |
Date: | 2021-10-12 12:51:08 |
Message-ID: | CAFiTN-tOSZYNc1pum6VFWUXZJ=oq+KzR7n1uXGVTxtdMBK1QdA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
While working on the issue [1], I realize that if a subtransaction
hasn't done any catalog change then we don't add this in the commit
xid list even if we are building a full snapshot [2]. That means when
we will convert this to the MVCC snapshot we will add this to a
running xid list. If my understanding is correct then how visibility
will work? Because if I look at the code in XidInMVCCSnapshot(), then
if the suboverflowed is not set then first we are going to look into
the snapshot->subxip array and if we don't find it there then we look
into the snapshot->xip array, and now we will be finding even
committed subxips in the snapshot->xip array. Am I missing something?
[2]
/*
* Add subtransaction to base snapshot if catalog modifying, we don't
* distinguish to toplevel transactions there.
*/
if (ReorderBufferXidHasCatalogChanges(builder->reorder, subxid))
{
sub_needs_timetravel = true;
needs_snapshot = true;
[3]
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2021-10-12 13:04:04 | Re: automatically generating node support functions |
Previous Message | Stephen Frost | 2021-10-12 12:49:28 | Re: storing an explicit nonce |