Re: making relfilenodes 56 bits - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: making relfilenodes 56 bits
Date
Msg-id CAFiTN-tyu24-A1YEotmuthO9A8_3nTEuBKoTv0h9KW9UzcjqAQ@mail.gmail.com
Whole thread Raw
In response to Re: making relfilenodes 56 bits  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
On Wed, Sep 21, 2022 at 3:39 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:

> Yeah you are right we can make it uint64.  With respect to this, we
> can not directly use uint64 because that is declared in c.h and that
> can not be used in
> postgres_ext.h IIUC.  So what are the other option maybe we can
> typedef the RelFIleNumber similar to what c.h done for uint64 i.e.
>
> #ifdef HAVE_LONG_INT_64
> typedef unsigned long int uint64;
> #elif defined(HAVE_LONG_LONG_INT_64)
> typedef long long int int64;
> #endif
>
> I am not liking duplicating this logic but is there any better
> alternative for doing this?  Can we move the existing definitions from
> c.h file to some common file (common for client and server)?

Here is the updated patch which fixes all the agreed comments. Except
this one which needs more thoughts, for now I have used unsigned long
int.



-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Sharma
Date:
Subject: Re: binary version of pg_current_wal_insert_lsn and pg_walfile_name functions
Next
From: Dilip Kumar
Date:
Subject: Re: making relfilenodes 56 bits