Re: dfmgr additional ABI version fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dfmgr additional ABI version fields
Date: 2021-10-07 15:49:57
Message-ID: 65011.1633621797@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
> I'm thinking about adding two more int fields to Pg_magic_struct: a
> product or vendor magic number, and an ABI version that can be used
> freely within a product/vendor.

Who would hand out these magic numbers?

If the answer is "choose a random one, it probably won't collide"
then I'm not sure why we need two fields. You can choose a new
random number for each ABI version, if you're changing it faster
than once per PG major version.

I'm also kind of unclear on why we need to do anything about this
in the community version. If someone has forked PG and changed
APIs to the extent that extensions are unlikely to work, there's
not much stopping them from also making the two-line change
to fmgr.h that would be needed to guarantee that different magic
struct contents are needed.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2021-10-07 15:50:23 Re: storing an explicit nonce
Previous Message Bruce Momjian 2021-10-07 15:45:35 Re: storing an explicit nonce