thinko in basic_archive.c

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: thinko in basic_archive.c
Date: 2022-10-14 04:41:06
Message-ID: 20221014044106.GA1673343@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
fix_basic_archive_timestamp.patch text/x-diff 666 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2022-10-14 05:02:53 Re: make_ctags: use -I option to ignore pg_node_attr macro
Previous Message Amit Kapila 2022-10-14 04:29:38 Re: Perform streaming logical transactions by background workers and parallel apply