Re: Fix unsigned output for signed values in SLRU error reporting
Pavel Borisov <pashkin.elfe@gmail.com>
From: Pavel Borisov <pashkin.elfe@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-21T12:11:31Z
Lists: 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
Commits
-
Fix unsigned output format in SLRU error reporting
- 01effb130420 15.0 landed