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

From Andres Freund
Subject Re: Confusing with commit time usage in logical decoding
Date
Msg-id 20160303074727.hvpitilqrl4fb3a2@alap3.anarazel.de
Whole thread Raw
In response to Re: Confusing with commit time usage in logical decoding  (Petr Jelinek <petr@2ndquadrant.com>)
List pgsql-hackers
On 2016-03-01 18:31:42 +0100, Petr Jelinek wrote:
> On 01/03/16 18:18, Andres Freund wrote:
> >I'd rather just initialize commit_time to parsed->xact_time.
> >
> >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...
> >
> 
> The test for commit timestamps checks that the timestamps are within
> reasonable time frame (for example, bigger than value of a timestamp column
> in the table since that's assigned before commit obviously) , it's not
> perfect but similar approach should catch issues like this one.

Fixed, including such a test. Thanks for the report; and for the idea of
the fix!

Andres



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Re: redo failed in physical streaming replication while stopping the master server
Next
From: "Shulgin, Oleksandr"
Date:
Subject: Re: More stable query plans via more predictable column statistics