eulerto / wal2json

JSON output plugin for changeset extraction
BSD 3-Clause "New" or "Revised" License
1.33k stars 161 forks source link

Test failure with PG12: Floating point issues #116

Closed df7cb closed 4 years ago

df7cb commented 5 years ago

Building against 12beta1, the regression tests fail pretty loudly. The new floating point precision is likely the reason, but there might be more (the log is really too long to read). Crisp excerpt:

16:41:19 -                         "columnvalues": [1, 1, 2, 3, 3.540, -876.563, 1.23, "teste     ", "testando", "um texto longo", "001110010101010", "Sat Nov 02 17:30:52 2013", "02-04-2013", true, "{ \"a\": 123 }", "'Old' 'Parr'"],                                               +
16:41:19 +                         "columnvalues": [1, 1, 2, 3, 3.540, -876.5635, 1.23, "teste     ", "testando", "um texto longo", "001110010101010", "Sat Nov 02 17:30:52 2013", "02-04-2013", true, "{ \"a\": 123 }", "'Old' 'Parr'"],

Full output at https://pgdgbuild.dus.dg-i.net/job/wal2json-binaries-beta/architecture=amd64,distribution=sid/5/consoleFull.

eulerto commented 5 years ago

Fixed at commit 926e11f00ce279c34d913c49e78f7becc56fbfd0. However, the test is broken because of setseed() + random() predictability [1].

[1] https://www.postgresql.org/message-id/CAHE3wgjD-aKX6JGFJsY6b5vkVV_MkBxZKSSHdDLzwX7fVy5VXQ%40mail.gmail.com

df7cb commented 5 years ago

Do you have any idea how to handle it?

df7cb commented 5 years ago

Ping. PG12 is out!

wolf4ara commented 5 years ago

Ping. PG12 is out!

+1

df7cb commented 4 years ago

There are still regression failures even when setting extra_float_digits = 0. The diff is too long to paste, but the affected tests are these:

test toast                        ... FAILED       51 ms
test bytea                        ... FAILED       37 ms
test message                      ... FAILED       24 ms
eulerto commented 4 years ago

@df7cb I fixed those tests in recent commits a897305e33bd9840b4516aa54e7019441ee46b3f and 7a03bb5202aa84c431119aacf0797662218ab581 .

df7cb commented 4 years ago

Thanks. Could you tag a new release so I can update the Debian package?