Re: Rationalizing declarations of src/common/ variables - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Rationalizing declarations of src/common/ variables
Date
Msg-id CALj2ACVSVrD4iCswOsAc3x-w8nfY6id1pq+fcDnPDqSErrQy1Q@mail.gmail.com
Whole thread Raw
In response to Rationalizing declarations of src/common/ variables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Nov 29, 2021 at 11:27 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> We've been burnt by this issue repeatedly (cf c2d1eea9e, d025cf88b,
> 11b500072) so I think it's time to try to formalize and document
> what to do to export a variable from src/common/ or src/port/.

+1 to document it.

> Here's a draft patch.  I'm not in love with the name "PGDLLIMPORT_FE"
> and would welcome better ideas.

How about PGDLLIMPORT_FE_BE which represents the macro to be used for
variables/functions common to both frontend and backend? Otherwise,
PGDLLIMPORT_COMM/PGDLLIMPORT_COMMON or PGDLLIMPORT_2 or
PGDLLIMPORT_PORT?

We have some of the #defines with "FeBe":
/*
 * prototypes for functions in pqcomm.c
 */
extern WaitEventSet *FeBeWaitSet;

#define FeBeWaitSetSocketPos 0
#define FeBeWaitSetLatchPos 1

Regards,
Bharath Rupireddy.



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Skipping logical replication transactions on subscriber side
Next
From: Greg Nancarrow
Date:
Subject: Re: row filtering for logical replication