Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)
Дата
Msg-id CAJ7c6TMnKtF4Z3_XC27DSRwSdCi1z92QU9J5wp5p4jLJ4Occ_A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-hackers
Hi Andres,

> This causes a lot of failures with ubsan

Thanks for reporting this!

I managed to reproduce the issue locally and to fix it. UBSAN is happy
now. PFA v49.

> I bet that this alignment issue can be fixed by using PGAlignedBlock
> instead of a raw char buffer for a page. (I'm guessing, I haven't
> directly checked.)

No, actually the problem was much simpler.

0001 changes SLRU page numbering from 32-bit to 64-bit one. This also
changed the SlruScanDirCbReportPresence() callback:

```
bool
SlruScanDirCbReportPresence(SlruCtl ctl, char *filename, int64 segpage,
                            void *data)
{
    int64        cutoffPage = *(int64 *) data;
```

However TruncateCLOG() and TruncateCommitTs() were not changed
accordingly in v47, they were passing a pointer to int32 as *data.

-- 
Best regards,
Aleksander Alekseev

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Richard Guo
Дата:
Сообщение: Check lateral references within PHVs for memoize cache keys
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: generic plans and "initial" pruning