Re: Adding the extension name to EData / log_line_prefix - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Adding the extension name to EData / log_line_prefix
Date
Msg-id 20240515211418.d3aulqz62wb4zzrx@awork3.anarazel.de
Whole thread Raw
In response to Re: Adding the extension name to EData / log_line_prefix  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Adding the extension name to EData / log_line_prefix
List pgsql-hackers
Hi,

On 2024-05-15 13:45:30 -0400, Tom Lane wrote:
> There is one advantage over my suggestion of changing PG_MODULE_MAGIC:
> if we tell people to write
> 
>    PG_MODULE_MAGIC;
>    #undef TEXTDOMAIN
>    #define TEXTDOMAIN PG_TEXTDOMAIN("hstore")
> 
> then that's 100% backwards compatible and they don't need any
> version-testing ifdef's.
> 
> I still think that the kind of infrastructure Andres proposes
> is way overkill compared to the value, plus it's almost certainly
> going to have a bunch of platform-specific problems to solve.

Maybe I missing something here. Even adding those two lines to the extensions
in core and contrib is going to end up being more lines than what I proposed?

What portability issues do you forsee? We already look up the same symbol in
all the shared libraries ("Pg_magic_func"), so we know that we can deal with
duplicate function names. Are you thinking that somehow we'd end up with
symbol interposition or something?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: recovery modules
Next
From: Tom Lane
Date:
Subject: Re: Adding the extension name to EData / log_line_prefix