• Tom Lane's avatar
    Fix bogus time printout in walreceiver's debug log messages. · 8120c745
    Tom Lane authored
    The displayed sendtime and receipttime were always exactly equal, because
    somebody forgot that timestamptz_to_str returns a static buffer (thereby
    simplifying life for most callers, at the cost of complicating it for those
    who need two results concurrently).  Apply the same pstrdup solution used
    by the other call sites with this issue.  Back-patch to 9.2 where the
    faulty code was introduced.  Per bug #9849 from Haruka Takatsuka, though
    this is not exactly his patch.
    
    Possibly we should change timestamptz_to_str's API, but I wouldn't want
    to do so in the back branches.
    8120c745
walreceiver.c 34.7 KB