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

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>, Michael Paquier <michael(at)paquier(dot)xyz>, Noah Misch <noah(at)leadboat(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Japin Li <japinli(at)hotmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, 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: 2024-07-11 10:11:05
Message-ID: CAJ7c6TPLGJ=wPkfpO=W1EwGEPaSBj3f-PJXF0yecKEB-Et5H3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> The proposed patch looks rather incomplete to me, based on the fact
> that this stuff has a lot of inconsistencies with the types used when
> manipulating 64b SLRU pages. Some of them are harder to catch as the
> variables don't specifically refer to pages.
>
> So, even after v2, there are two more of these in asyncQueueUsage()
> with the two QUEUE_POS_PAGE() for the head and tail positions:
> int headPage = QUEUE_POS_PAGE(QUEUE_HEAD);
> int tailPage = QUEUE_POS_PAGE(QUEUE_TAIL);
>
> asyncQueueReadAllNotifications() also has one:
> int curpage = QUEUE_POS_PAGE(pos);
>
> asyncQueueAdvanceTail() declares the following:
> int oldtailpage;
> int newtailpage;
> int boundary;
>
> AsyncQueueControl.stopPage is an int.
>
> And that's only for async.c. Alexander K., as the owner of the open
> item, are you planning to look at that?

Thanks, Michael. I prepared a corrected patchset.

--
Best regards,
Aleksander Alekseev

Attachment Content-Type Size
v3-0001-Fix-the-comment-for-SlruCtlData.long_segment_name.patch application/octet-stream 1020 bytes
v3-0002-Use-int64-for-page-numbers-in-clog.c-async.c.patch application/octet-stream 3.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-07-11 10:21:16 Re: speed up a logical replica setup
Previous Message Tatsuo Ishii 2024-07-11 09:34:33 Re: CFbot failed on Windows platform