Re: Small SSI issues
От | Kevin Grittner |
---|---|
Тема | Re: Small SSI issues |
Дата | |
Msg-id | 4E12EF7E020000250003EFB2@gw.wicourts.gov обсуждение исходный текст |
Ответ на | Re: Small SSI issues (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Small SSI issues
|
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> wrote: > Well, as long as we can verify that OLDSERXID_MAX_PAGE has the > same value for BLCKSZ=8K before and after this patch, I don't see > any real downside to applying it. If, hypothetically, it's buggy, > it's only going to break things for non-default block sizes which > are, by your description, not correct right now anyway. Outside of a code comment, the entire patch consists of replacing the definition of the OLDSERXID_MAX_PAGE macro. The old definition is: (SLRU_PAGES_PER_SEGMENT * 0x10000 - 1) SLRU_PAGES_PER_SEGMENT is define to be 32. So this is: (32 * 0x10000) - 1 = 2097151 The new definition is the min of the old one and a value based on BLCKSZ: (MaxTransactionId + 1) / OLDSERXID_ENTRIESPERPAGE - 1) Where "entries per page" is BLCKSZ / sizeof(uint64). For an 8K BLCKSZ this is: ((0xffffffff + 1) / 1024) - 1 = 4194303 So the macro is guaranteed to have the same value as it currently does for BLCKSZ of 16KB or lower. -Kevin
В списке pgsql-hackers по дате отправления: