pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: v.ventirozos@gmail.com
Subject: BUG #15304: Problem when replicating Floating point timestamps to int64 timestamps
Date: Fri, 27 Jul 2018 17:31:02 +0000
Message-ID: <153271266275.1396.4515851245483780977@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15304
Logged by:          Vasilis Ventirozos
Email address:      v.ventirozos@gmail.com
PostgreSQL version: 9.6.3
Operating system:   ubuntu xenial
Description:        

Hey all, 
While testing a migration procedure on a database (v9.6.9) from floating
point datetimes to int64 (v9.6.9) using pglogical i saw that after the
initial data sync all the subsequent replicated rows containing dates are
getting nonsensical datetime values in the subscriber. 
I've read:
https://www.postgresql.org/message-id/flat/26788.1487455319%40sss.pgh.pa.us#26788.1487455319@sss.pgh...
So I know that this is not something new, but i was wondering if there is
any way around this, other than just use slony (that works fine). For
example if there was a pattern, i could possibly translate the "wrong" dates
on the subscriber using a trigger. An interesting observation is that date
'2000-01-01 00:00:00' was actually transferred fine, while '1999-01-01
00:00:00' made the sync worker to error out with "date out of range".

Some examples bellow :
 id |            mydate            |             should_be          |
----+------------------------------+-------------------------------+
72 | 2018-01-01 00:00:00          | Initial row before replication |
73 | 2000-01-01 00:00:00          | 2000-01-01 00:00:00            |
74 | 151547-03-14 20:46:33.353216 | 2001-01-01 00:00:00            |
75 | 151689-07-17 15:26:49.024512 | 2002-01-01 00:00:00            |
76 | 151765-01-03 19:04:55.441408 | 2003-01-01 00:00:00            |
77 | 151832-01-28 12:43:50.545408 | 2004-01-01 00:00:00            |
78 | 151874-03-11 10:09:15.259904 | 2005-01-01 00:00:00            |
79 | 151907-09-22 18:58:42.811904 | 2006-01-01 00:00:00            |

Best Regards,
Vasilis Ventirozos
OmniTI Computer Consulting Inc.



view thread (3+ messages)  latest in thread

Message-ID: <153271266275.1396.4515851245483780977@wrigleys.postgresql.org>
Permalink:  ../153271266275.1396.4515851245483780977@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/153271266275.1396.4515851245483780977@wrigleys.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-bugs@postgresql.org
  Cc: noreply@postgresql.org, v.ventirozos@gmail.com
  Subject: Re: BUG #15304: Problem when replicating Floating point timestamps to int64 timestamps
  In-Reply-To: <153271266275.1396.4515851245483780977@wrigleys.postgresql.org>
  References: <153271266275.1396.4515851245483780977@wrigleys.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