Re: making relfilenodes 56 bits
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Heikki Linnakangas <hlinnaka@iki.fi>, Thomas Munro <thomas.munro@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-07-18T11:21:00Z
Lists: pgsql-hackers
On Thu, Jul 14, 2022 at 5:18 PM Dilip Kumar <dilipbalaut@gmail.com> wrote: > Apart from this I have fixed all the pending issues that includes > > - Change existing macros to inline functions done in 0001. > - Change pg_class index from (tbspc, relfilenode) to relfilenode and > also change RelidByRelfilenumber(). In RelidByRelfilenumber I have > changed the hash to maintain based on just the relfilenumber but we > still need to pass the tablespace to identify whether it is a shared > relation or not. If we want we can make it bool but I don't think > that is really needed here. > - Changed logic of GetNewRelFileNumber() based on what Robert > described, and instead of tracking the pending logged relnumbercount > now I am tracking last loggedRelNumber, which help little bit in > SetNextRelFileNumber in making code cleaner, but otherwise it doesn't > make much difference. > - Some new asserts in buf_internal inline function to validate value > of computed/input relfilenumber. I was doing some more testing by setting the FirstNormalRelFileNumber to a high value(more than 32 bits) I have noticed a couple of problems there e.g. relpath is still using OIDCHARS macro which says max relfilenumber file name can be only 10 character long which is no longer true. So there we need to change this value to 20 and also need to carefully rename the macros and other variable names used for this purpose. Similarly there was some issue in macro in buf_internal.h while fetching the relfilenumber. So I will relook into all those issues and repost the patch soon. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
Commits
-
Fix typos in comments, code and documentation
- 33ab0a2a527e 16.0 cited
-
Increase width of RelFileNumbers from 32 bits to 56 bits.
- 05d4cbf9b6ba 16.0 landed
-
Move RelFileNumber declarations to common/relpath.h.
- 2f47715cc864 16.0 landed
-
Include RelFileLocator fields individually in BufferTag.
- 82ac34db2036 16.0 landed
-
Convert macros to static inline functions (buf_internals.h)
- 3ac88fddd92c 16.0 landed
-
Remove the restriction that the relmap must be 512 bytes.
- d8cd0c6c95c0 16.0 landed
-
Change internal RelFileNode references to RelFileNumber or RelFileLocator.
- b0a55e43299c 16.0 landed
-
Reorder subskiplsn in pg_subscription to avoid alignment issues.
- 79b716cfb7a1 15.0 cited
-
Fix DROP {DATABASE,TABLESPACE} on Windows.
- 4eb2176318d0 15.0 cited
-
Restructure smgr API as per recent proposal. smgr no longer depends on
- 87bd95638552 8.0.0 cited