Re: pg_dump/pg_restore seem broken on hamerkop - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump/pg_restore seem broken on hamerkop
Date
Msg-id 16880.1414368709@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump/pg_restore seem broken on hamerkop  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: pg_dump/pg_restore seem broken on hamerkop
Re: pg_dump/pg_restore seem broken on hamerkop
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_dump/pg_restore seem broken on hamerkop
Next
From: Tom Lane
Date:
Subject: Re: pg_dump/pg_restore seem broken on hamerkop