pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Be more careful about time_t vs. pg_time_t in basebackup.c.
Date: Sat, 04 Apr 2020 00:22:09 +0000
Message-ID: <E1jKWZd-0006ri-FI@gemulon.postgresql.org> (raw)

Be more careful about time_t vs. pg_time_t in basebackup.c.

lapwing is complaining that about a call to pg_gmtime, saying that
it "expected 'const pg_time_t *' but argument is of type 'time_t *'".
I at first thought that the problem had someting to do with const,
but Thomas Munro suggested that it might be just because time_t
and pg_time_t are different identifers. lapwing is i686 rather than
x86_64, and pg_time_t is always int64, so that seems like a good
guess.

There is other code that just casts time_t to pg_time_t without
any conversion function, so try that approach here.

Introduced in commit 0d8c9c1210c44b36ec2efcb223a1dfbe897a3661.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/db1531cae00941bfe4f6321fdef1e1ef355b6bed

Modified Files
--------------
src/backend/replication/basebackup.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



Message-ID: <E1jKWZd-0006ri-FI@gemulon.postgresql.org>
Permalink:  ../E1jKWZd-0006ri-FI@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jKWZd-0006ri-FI@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Be more careful about time_t vs. pg_time_t in basebackup.c.
  In-Reply-To: <E1jKWZd-0006ri-FI@gemulon.postgresql.org>
  References: <E1jKWZd-0006ri-FI@gemulon.postgresql.org>

* 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