pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rikard@ngs.hr
To: pgsql-bugs@postgresql.org
Subject: BUG #14450: inconsistent results on async slave
Date: Tue, 06 Dec 2016 08:57:36 +0000
Message-ID: <20161206085736.4360.39346@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      14450
Logged by:          Rikard Pavelic
Email address:      rikard@ngs.hr
PostgreSQL version: 9.3.14
Operating system:   Linux
Description:        

Before applying new version of the function to the database I wanted to
check if results of the function were the same

So we ran a query like this:

select a.id, original_fun(a.id), new_fun(a.id)
from table a
where coalesce(original_fun(a.id), MIN_DATE) != coalesce(new_fun(a.id),
MIN_DATE)

on all our async slave instances.
Strangely for small number of rows (6 out of 500k) this query returned
different results.
After running:

select original_fun(diff_id), new_fun(diff_id);

for one of those ids, the function returned the same result.

Is this expected behavior?

original_fun = plpgsql (volatile - should be stable)
new_fun = sql

What is even more strange, is that different results were like this:

id1, X1, null
id2, null, X2
id3, X3, null
id4, X4, null
id5, X5, null
id6, X6, null

data is only inserted and X_ represents min date of sum subset of data in
other tables.

Regards,
Rikard


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


view thread (2+ messages)  latest in thread

Message-ID: <20161206085736.4360.39346@wrigleys.postgresql.org>
Permalink:  ../20161206085736.4360.39346@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20161206085736.4360.39346@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: rikard@ngs.hr
  Subject: Re: BUG #14450: inconsistent results on async slave
  In-Reply-To: <20161206085736.4360.39346@wrigleys.postgresql.org>
  References: <20161206085736.4360.39346@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