pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wells Oliver <wells.oliver@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: pg_restore: warning: invalid creation date in header
Date: Sun, 13 Jun 2021 11:57:17 -0400
Message-ID: <52307.1623599837@sss.pgh.pa.us> (raw)
In-Reply-To: <50545.1623597209@sss.pgh.pa.us>
References: <CAOC+FBWDhDHO7G-i1_n_hjRzCnUeFO+H-Czi1y10mFhRWpBrew@mail.gmail.com>
	<50545.1623597209@sss.pgh.pa.us>

I wrote:
> Hmm.  Looking at the code for that, it knows nothing of timezones.
> It's complaining that mktime() failed, which perhaps is because of
> bad data in the archive header ... but I'm betting it has something
> to do with failing to initialize all the fields of the struct tm
> it passes.

After reading the mktime man page, I take that back --- it's not
supposed to consider the passed-in values of the tm_wday and tm_yday
fields.  The only documented reason for mktime to fail is if the
supplied values map to something outside the range of time_t,
which seems a tad unlikely.  It'd be interesting perhaps to see
the raw header of your dump file, along the lines of
"od -c dumpfile | head".

			regards, tom lane





view thread (11+ messages)  latest in thread

Message-ID: <52307.1623599837@sss.pgh.pa.us>
Permalink:  ../52307.1623599837@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/52307.1623599837@sss.pgh.pa.us

 · 

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, wells.oliver@gmail.com
  Subject: Re: pg_restore: warning: invalid creation date in header
  In-Reply-To: <52307.1623599837@sss.pgh.pa.us>

* 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