Re: pg_dump/pg_restore seem broken on hamerkop

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump/pg_restore seem broken on hamerkop
Date: 2014-10-27 00:11:49
Message-ID: 16880.1414368709@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> So this seems related to the %z part of the strftime() call. I have no
> explanation for this failure ATM; maybe pg_restore is failing to set the
> locale properly? I also notice pg_restore.c previously included
> pg_backup_archiver.h (which in turn includes <time.h>); strftime
> requires <time.h> so maybe this is causing a problem, but since
> pg_restore.c itself is not calling strftime, I don't see how this would
> be related.

Hm. %z ought not be locale-dependent ... however, it has a bigger
problem, which is that it's a C99-ism. It's not there in SUSv2,
which is our normal baseline for what's portable. I think we need
to get rid of that. %Z should be portable.

(Is it possible that Windows' strftime() reads %z as doing something
other than what C99 says?)

> [Some more code and git-log reading later] I see that the %z is a very
> recent addition: it only got there as of commit ad5d46a449, of September
> 5th ... and now I also see that hamerkop's last green run before the
> failure, on Oct 13rd, did *not* include the pg_upgrade check. So I'm
> thinking this was broken much earlier than 0eea804.

Ooohh ... you are right, the first failing build involved not only
the pg_dump refactoring commit, but an upgrade in the buildfarm script
that hamerkop was using (from 4.4 to 4.14). So it's entirely possible
this issue was already there and we just weren't seeing it tested.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-10-27 00:29:19 Re: pg_dump/pg_restore seem broken on hamerkop
Previous Message Alvaro Herrera 2014-10-26 23:56:20 Re: pg_dump/pg_restore seem broken on hamerkop