Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)
Pavel Borisov <pashkin.elfe@gmail.com>
> > > I think there needs to be a bit more soul searching here on how to > > handle that in the future and how to transition it. I don't think > > targeting this patch for PG15 is useful at this point. > > The patches can be reordered so that we are still able to deliver SLRU > refactoring in PG15. > Sure. > > As a more general point, I don't like plastering these bulky casts all > > over the place. Casts hide problems. > > Regarding the casts, I don't like them either. I agree that it could > be a good idea to invest a little more time into figuring out if this > transit can be handled in a better way and deliver this change in the > next CF. However, if no one will be able to suggest a better > alternative, I think we should continue making progress here. The > 32-bit XIDs are a major inconvenience for many users. > I'd like to add that the initial way of shifting to 64bit was based on XID_FMT in a print formatting template which could be changed from 32 to 64 bit when shifting to 64-bit xids later. But this template is not localizable so hackers recommended using %lld/%llu with (long long)/(unsigned long long cast) which is a current best practice elsewhere in the code (e.g. recent 1f8bc448680bf93a9). So I suppose we already have a good enough way to stick to. This approach in 0001 inherently processes both 32/64 bit xids and should not change with later committing 64bit xids later ( https://postgr.es/m/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com ) The thing that needs to change then is suppressing output of Epoch. It should be done when 64-xids are committed and it is done by 0006 in the mentioned thread. Until that I've left Epoch in the output. Big thanks for your considerations! -- Best regards, Pavel Borisov Postgres Professional: http://postgrespro.com <http://www.postgrespro.com>
Commits
-
Fix more holes with SLRU code in need of int64 for segment numbers
- b7935bc10b78 17.0 landed
- bd06cc338d82 18.0 landed
- e367a413b09f 17.0 landed
- c9e24573905b 18.0 landed
-
Use more consistently int64 for page numbers in SLRU-related code
- 165ea79a6077 17.0 landed
- 3937cadfd438 18.0 landed
-
Improve comments in slru.{c,h} about segment name format
- 3b279d89cb5c 17.0 landed
- ffb060392961 18.0 landed
-
Reorder actions in ProcArrayApplyRecoveryInfo()
- c64086b79dba 17.0 landed
-
Fix typo in 5a1dfde8334b
- ae2ccf66a261 17.0 landed
-
Fix warning due non-standard inline declaration in 4ed8f0913bfdb5f355
- b589f211e025 17.0 landed
-
Add SLRU tests for 64-bit page case
- a60b8a58f435 17.0 landed
-
Make use FullTransactionId in 2PC filenames
- 5a1dfde8334b 17.0 landed
-
Use larger segment file names for pg_notify
- 2cdf131c46e6 17.0 landed
-
Index SLRUs by 64-bit integers rather than by 32-bit integers
- 4ed8f0913bfd 17.0 landed
-
Keep track of transaction commit timestamps
- 73c986adde5d 9.5.0 cited
-
Handle 5-char filenames in SlruScanDirectory
- 638cf09e76d7 9.4.0 cited