Re: cleanup patches for incremental backup
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-03-14T21:00:10Z
Lists: pgsql-hackers
Attachments
- overflow_fix.patch (text/x-diff) patch
On Wed, Jan 24, 2024 at 12:05:15PM -0600, Nathan Bossart wrote: > There might be an overflow risk in the cutoff time calculation, but I doubt > that's the root cause of these failures: > > /* > * Files should only be removed if the last modification time precedes the > * cutoff time we compute here. > */ > cutoff_time = time(NULL) - 60 * wal_summary_keep_time; I've attached a short patch for fixing this overflow risk. Specifically, it limits wal_summary_keep_time to INT_MAX / SECS_PER_MINUTE, just like log_rotation_age. I considering checking for overflow when we subtract the keep-time from the result of time(2), but AFAICT there's only a problem if time_t is unsigned, which Wikipedia leads me to believe is unusual [0], so I figured we might be able to just wait this one out until 2038. > Otherwise, I think we'll probably need to add some additional logging to > figure out what is happening... Separately, I suppose it's probably time to revert the temporary debugging code adding by commit 5ddf997. I can craft a patch for that, too. [0] https://en.wikipedia.org/wiki/Unix_time#Representing_the_number -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Avoid overflow in MaybeRemoveOldWalSummaries().
- 80686761c49d 17.0 landed
-
Revert "Temporary patch to help debug pg_walsummary test failures."
- 2b520860c08a 17.0 landed
-
Revise pg_walsummary's 002_blocks test to avoid spurious failures.
- ea18eb7d6255 17.0 landed
-
Temporary patch to help debug pg_walsummary test failures.
- 5ddf99734777 17.0 landed
-
More documentation updates for incremental backup.
- 7b1dbf0a8d1d 17.0 landed
-
Fix typos.
- 237d01139b8a 17.0 landed
-
Fix typo.
- 882887e9b458 17.0 landed
-
Try to fix pg_walsummary buildfarm failures.
- a7097ca630a2 17.0 cited
-
Repair various defects in dc212340058b4e7ecfc5a7a81ec50e7a207bf288.
- 3d5c332a3d60 17.0 landed
-
Add new pg_walsummary tool.
- ee1bfd168390 17.0 landed
-
Add new function pg_get_wal_summarizer_state().
- d9ef650fca7b 17.0 landed
-
Document WAL summarization information functions.
- f896057e46b0 17.0 landed