Re: Fix unsigned output for signed values in SLRU error reporting - Mailing list pgsql-hackers

From Pavel Borisov
Subject Re: Fix unsigned output for signed values in SLRU error reporting
Date
Msg-id CALT9ZEGFM+fdKMJ-_-HP9mzm2nmrE7HjVritsz75EBiMbXGA+A@mail.gmail.com
Whole thread Raw
In response to Re: Fix unsigned output for signed values in SLRU error reporting  (Andres Freund <andres@anarazel.de>)
Responses Re: Fix unsigned output for signed values in SLRU error reporting  (Pavel Borisov <pashkin.elfe@gmail.com>)
List pgsql-hackers
Afaics offset etc can't be negative, so I don't think this really improves
matters. I think there's quite a few other places where we use %u to print
integers that we know aren't negative.

If anything I think we should change the signed integers to unsigned ones. It
might be worth doing that as part of
https://www.postgresql.org/message-id/CAJ7c6TPDOYBYrnCAeyndkBktO0WG2xSdYduTF0nxq%2BvfkmTF5Q%40mail.gmail.com

That was one of my intentions in the mentioned patch, but I couldn't confirm that the page number (and offset) in SLRU was used signed not by purpose. Thank you for confirming this. I will try to replace int to unsigned where it is relevant in SLRU as part of the mentioned thread. Though it could be a big change worth a separate patch maybe.

Again thanks!
Pavel 

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Column Filtering in Logical Replication
Next
From: Dong Wook Lee
Date:
Subject: Re: Add pg_freespacemap extension sql test