infobits_set WAL record struct field is int8

Started by Peter Geogheganabout 3 years ago3 messageshackers
Jump to latest

Commit 0ac5ad5134 ("Improve concurrency of foreign key locking") added
infobits_set fields to certain WAL records. However, in the case of
xl_heap_lock, it made the data type int8 rather than uint8.

I believe that this was a minor oversight. Attached patch fixes the issue.

--
Peter Geoghegan

Attachments:

v1-0001-Fix-xl_heap_lock.infobits_set-type.patchapplication/octet-stream; name=v1-0001-Fix-xl_heap_lock.infobits_set-type.patchDownload+2-3
#2Andres Freund
andres@anarazel.de
In reply to: Peter Geoghegan (#1)
Re: infobits_set WAL record struct field is int8

Hi,

On 2023-04-11 13:13:49 -0700, Peter Geoghegan wrote:

Commit 0ac5ad5134 ("Improve concurrency of foreign key locking") added
infobits_set fields to certain WAL records. However, in the case of
xl_heap_lock, it made the data type int8 rather than uint8.

I believe that this was a minor oversight. Attached patch fixes the issue.

Makes sense. Looks like there never was a flag defined for the sign bit,
luckily. I assume you're just going to apply this for HEAD?

Greetings,

Andres Freund

In reply to: Andres Freund (#2)
Re: infobits_set WAL record struct field is int8

On Tue, Apr 11, 2023 at 1:48 PM Andres Freund <andres@anarazel.de> wrote:

Makes sense. Looks like there never was a flag defined for the sign bit,
luckily. I assume you're just going to apply this for HEAD?

Yes.

I'm also going to rename the TransactionId field to "xmax", for
consistency with nearby very similar records (like
xl_heap_lock_updated).

--
Peter Geoghegan