Avoid distributing new catalog snapshot again for the transaction being decoded. - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject Avoid distributing new catalog snapshot again for the transaction being decoded.
Date
Msg-id OS0PR01MB57169E394CD4AB71F9C6D58E940E9@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
Responses Re: Avoid distributing new catalog snapshot again for the transaction being decoded.
List pgsql-hackers
Hi,

When doing some other related work, I noticed that when decoding the COMMIT
record via SnapBuildCommitTxn()-> SnapBuildDistributeNewCatalogSnapshot() we
will add a new snapshot to all transactions including the one being decoded(just committed one).

But since we've already done required modifications in the snapshot for the
current transaction being decoded(in SnapBuildCommitTxn()), so I think we can
avoid adding a snapshot for it again.

Here is the patch to improve this.
Thoughts ?

Best regards,
Hou zhijie


Attachment

pgsql-hackers by date:

Previous
From: Jakub Wartak
Date:
Subject: Re: CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1
Next
From: Maxim Orlov
Date:
Subject: Re: [BUG] FailedAssertion in SnapBuildPurgeOlderTxn