Re: Confusing with commit time usage in logical decoding - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Confusing with commit time usage in logical decoding
Date
Msg-id 20160301172835.GA358846@alvherre.pgsql
Whole thread Raw
In response to Re: Confusing with commit time usage in logical decoding  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund wrote:

> I'd rather just initialize commit_time to parsed->xact_time.

That also works.

Probably also change its declaration to actually be TimestampTz ...

> This indeed is clearly a bug. I do wonder if anybody has a good idea
> about how to add regression tests for this? It's rather annoying that
> we have to suppress timestamps in the test_decoding tests, because
> they're obviously not reproducible...

Maybe commit two transactions with a 1s sleep in between, and verify
that the difference between the two timestamps is >= 1s and <= now()?
(I don't know the test_decoding test suite)

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: [NOVICE] WHERE clause not used when index is used
Next
From: Tom Lane
Date:
Subject: Re: [NOVICE] WHERE clause not used when index is used