thinko in basic_archive.c - Mailing list pgsql-hackers

From Nathan Bossart
Subject thinko in basic_archive.c
Date
Msg-id 20221014044106.GA1673343@nathanxps13
Whole thread Raw
Responses Re: thinko in basic_archive.c
List 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

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply
Next
From: Yugo NAGATA
Date:
Subject: Re: make_ctags: use -I option to ignore pg_node_attr macro