From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Maxim Orlov <orlovmg(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Subject: | Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15) |
Date: | 2023-11-07 12:05:10 |
Message-ID: | CAJ7c6TOTOPdqBCQj1EAb11=GZUy0HUGxCcHJzLpG9iirR+eJzQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi again,
> PFA the corrected patchset v59.
On second thought, I believe this Assert is incorrect:
```
+ else
+ {
+ Assert(segno >= 0 && segno <= 0xFFFF);
+ return snprintf(path, MAXPGPATH, "%s/%04X", (ctl)->Dir,
+ (unsigned int) segno);
+ }
```
See SlruCorrectSegmentFilenameLength():
```
if (ctl->long_segment_names)
return (len == 15); /* see SlruFileName() */
else
/*
* Commit 638cf09e76d allowed 5-character lengths. Later commit
* 73c986adde5 allowed 6-character length.
*
* XXX should we still consider such names to be valid?
*/
return (len == 4 || len == 5 || len == 6);
```
Should we just drop it or check that segno is <= 0xFFFFFF?
--
Best regards,
Aleksander Alekseev
From | Date | Subject | |
---|---|---|---|
Next Message | Matthias van de Meent | 2023-11-07 12:20:39 | Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan |
Previous Message | Aleksander Alekseev | 2023-11-07 11:57:12 | Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15) |