From: | Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Replace known_assigned_xids_lck by memory barrier |
Date: | 2023-03-19 09:43:43 |
Message-ID: | CANtu0oh0si=jG5z_fLeFtmYcETssQ08kLEa8b6TQqDm_cinroA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello everyone and Tom.
Tom, this is about your idea (1) from 2010 to replace spinlock with a
memory barrier in a known assignment xids machinery.
It was mentioned by you again in (2) and in (3) we have decided to
extract this change into a separate commitfest entry.
So, creating it here with a rebased version of (4).
In a nutshell: KnownAssignedXids as well as the head/tail pointers are
modified only by the startup process, so spinlock is used to ensure
that updates of the array and head/tail pointers are seen in a correct
order. It is enough to pass the barrier after writing to the array
(but before updating the pointers) to achieve the same result.
Best regards.
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Removes-known_assigned_xids_lck-using-the-write-m.patch | application/x-patch | 5.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-03-19 11:20:27 | Re: Fix fseek() detection of unseekable files on WIN32 |
Previous Message | David Rowley | 2023-03-19 09:38:12 | Re: heapgettup refactoring |