Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction
Date
Msg-id CA+hUKG+yRrVXLzo0v+MQ=9aZcy8GFAO8MSLnJcNjBDtFU_QQrw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tue, Mar 7, 2023 at 12:42 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
> > As mentioned, this approach allows for more improvements in later
> > patches.  There is absolutely no reason for transactions in separate
> > databases to be in each others' possibleUnsafeConflicts lists.
>
> What if they both touched/modified a shared catalog?

I was assuming that that would already skip all predicate locking because:

/*
 * Does this relation participate in predicate locking? Temporary and system
 * relations are exempt.
 */
static inline bool
PredicateLockingNeededForRelation(Relation relation)
{
        return !(relation->rd_id < FirstUnpinnedObjectId ||
                         RelationUsesLocalBuffers(relation));
}

If we ever wanted to use SSI on catalogs, or allow shared relations
that aren't catalogs, or allow cross-database access, then this
optimisation wouldn't fly.



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction
Next
From: Tom Lane
Date:
Subject: Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction