thinko in basic_archive.c
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2022-10-14T04:41:06Z
Lists: pgsql-hackers
Attachments
- fix_basic_archive_timestamp.patch (text/x-diff) patch
Hi hackers, I intended for the temporary file name generated by basic_archive.c to include the current timestamp so that the name was "sufficiently unique." Of course, this could also be used to determine the creation time, but you can just as easily use stat(1) for that. In any case, I forgot to divide the microseconds field by 1000 to obtain the current timestamp in milliseconds, so while the value is unique, it's also basically garbage. I've attached a small patch that fixes this so that the temporary file name includes the timestamp in milliseconds for when it was created. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Fix calculation related to temporary WAL segment name in basic_archive
- 9ebcb5ffdf3a 15.1 landed
- c68a1839902d 16.0 landed