Re: BUG #18658: Assert in SerialAdd() due to race condition

From: Maxim Orlov <orlovmg(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Andrew Bille <andrewbille(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18658: Assert in SerialAdd() due to race condition
Date: 2024-10-23 13:31:32
Message-ID: CACG=eza1dzSk5EZR-+hW+wk2250+tZjFR1tEssjq5f9ADRgbLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I think there is a bit more in this module. Though, not related to the
described error. See, we copy nextXid from TransamVariables assuming
TransactionId is atomic. But the nextXid is of FullTransactionId, i.e.
64-bit. And this will work fine on modern 64-bit platforms where 64-bit
FullTransactionId actually would be atomic, but not for the x86. And since
we still support x86 platforms, we better use lock here.

--
Best regards,
Maxim Orlov.

Attachment Content-Type Size
v1-0001-Hold-XidGenLock-to-read-TransamVariables-nextXid.patch application/octet-stream 1.4 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message jian he 2024-10-23 14:18:22 Re: BUG #18568: BUG: Result wrong when do group by on partition table!
Previous Message Tender Wang 2024-10-23 10:42:40 Re: BUG #18568: BUG: Result wrong when do group by on partition table!