pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid overflow in MaybeRemoveOldWalSummaries().
Date: Wed, 20 Mar 2024 18:34:30 +0000
Message-ID: <E1rn0li-004otZ-2C@gemulon.postgresql.org> (raw)

Avoid overflow in MaybeRemoveOldWalSummaries().

This commit limits the maximum value of wal_summary_keep_time to
INT_MAX / SECS_PER_MINUTE to avoid overflow when it is converted to
seconds.  In passing, use the HOURS_PER_DAY, MINS_PER_HOUR, and
SECS_PER_MINUTE macros in the code for this GUC instead of hard-
coding those values.

Discussion: https://postgr.es/m/20240314210010.GA3056455%40nathanxps13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/80686761c49d5194d224b344e968c26981611726

Modified Files
--------------
src/backend/postmaster/walsummarizer.c | 4 ++--
src/backend/utils/misc/guc_tables.c    | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)



Message-ID: <E1rn0li-004otZ-2C@gemulon.postgresql.org>
Permalink:  ../E1rn0li-004otZ-2C@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rn0li-004otZ-2C@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Avoid overflow in MaybeRemoveOldWalSummaries().
  In-Reply-To: <E1rn0li-004otZ-2C@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox