In core use of RegisterXactCallback() and RegisterSubXactCallback() - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject In core use of RegisterXactCallback() and RegisterSubXactCallback()
Date
Msg-id ajypPeEWceXRGAEW@bdtpg
Whole thread
List pgsql-hackers
Hi hackers,

while working on [1] I wanted to make use of RegisterSubXactCallback() and
realized that RegisterXactCallback() has this comment:

"
 * These functions are intended for use by dynamically loaded modules.
 * For built-in modules we generally just hardwire the appropriate calls
 * (mainly because it's easier to control the order that way, where needed).
"

So I thought of hardwiring the call directly in Start/Commit/AbortSubTransaction()
instead.

Then I realized that b7b27eb41a5 just made use of RegisterXactCallback() and
RegisterSubXactCallback(), so I'm wondering if it should hardwire the calls
instead?

Note that the other RegisterSubXactCallback() and RegisterXactCallback() look
legitimate to me (as in loadable modules).

[1]: https://www.postgresql.org/message-id/ajVD9TjerBLteNlx%40bdtpg

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Chao Li
Date:
Subject: Re: Small patch to improve safety of utf8_to_unicode().