GithubHelp home page GithubHelp logo

Comments (5)

eulerto avatar eulerto commented on June 12, 2024 2

Thanks for your test case. This fix will be included in the next version.

from wal2json.

DemianD avatar DemianD commented on June 12, 2024

Ping @eulerto (sorry for pinging you directly). We would like to solve this, but don't know where to start. Do you happen to have an idea what the problem could be?

from wal2json.

eulerto avatar eulerto commented on June 12, 2024

What's your Postgres version? What's your wal2json version? Could you provide a reproducible test case?

from wal2json.

DemianD avatar DemianD commented on June 12, 2024

Thank you for your response, @eulerto.

We are currently using the following versions locally:

  • Postgres version: PostgreSQL 14.5 (Debian 14.5-1.pgdg110+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit

  • wal2json version: Package: postgresql-14-wal2json - Version: 2.5-1.pgdg110+1 (installed using apt)

I've created a small video recording. At the bottom, you can find the SQL statements for the reproducible test case.

wal2json-trimmed.mov

File 1:

-- Setup

SET search_path to "public";
DROP TABLE IF EXISTS "public"."outbox_messages";
CREATE SEQUENCE IF NOT EXISTS outbox_messages_id_seq;
CREATE TABLE "public"."outbox_messages" (
    "id" int4 NOT NULL DEFAULT nextval('outbox_messages_id_seq'::regclass),
    "payload" text NOT NULL,
    PRIMARY KEY ("id")
);

-- Start

SELECT 'init' FROM pg_create_logical_replication_slot('test_1', 'wal2json');
SELECT pg_logical_emit_message(false, 'heartbeat', now()::varchar);

-- While the other transaction is busy, execute the following statement a couple times:
SELECT pg_logical_emit_message(false, 'heartbeat', now()::varchar);

SELECT data FROM pg_logical_slot_peek_changes('test_1', null, null);
SELECT 'stop' FROM pg_drop_replication_slot('test_1');

File 2:

SET search_path to "public";

BEGIN;
INSERT INTO outbox_messages (payload) VALUES ('test1');
SELECT pg_sleep(3);
INSERT INTO outbox_messages (payload) VALUES ('test1');
SELECT pg_sleep(2);
INSERT INTO outbox_messages (payload) VALUES ('test1');
COMMIT;

from wal2json.

djairhogeuens avatar djairhogeuens commented on June 12, 2024

@eulerto any idea on when the next version will be released?

from wal2json.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.