Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lsSUF-0004vm-Tc for pgsql-admin@arkaria.postgresql.org; Sun, 13 Jun 2021 15:57:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lsSUD-0004zo-N6 for pgsql-admin@arkaria.postgresql.org; Sun, 13 Jun 2021 15:57:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lsSUD-0004zf-Du for pgsql-admin@lists.postgresql.org; Sun, 13 Jun 2021 15:57:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lsSUB-0006A8-Ri for pgsql-admin@postgresql.org; Sun, 13 Jun 2021 15:57:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15DFvHPt052308; Sun, 13 Jun 2021 11:57:17 -0400 From: Tom Lane To: Wells Oliver cc: pgsql-admin Subject: Re: pg_restore: warning: invalid creation date in header In-reply-to: <50545.1623597209@sss.pgh.pa.us> References: <50545.1623597209@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 13 Jun 2021 11:13:29 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <52306.1623599837.1@sss.pgh.pa.us> Date: Sun, 13 Jun 2021 11:57:17 -0400 Message-ID: <52307.1623599837@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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