Postgres logical replication not working

we have created logical replication slot on pg 10 using below command

select * 
from pg_create_logical_replication_slot('slot', 'wal2json');

Above request creates slot on database

 select * from pg_replication_slots; 

enter image description here

PG replication not returning stream events using slot listen command.

Slots size automatically increases to high value.

Below are postgress level global configs

shared_preload_libraries=decoderbufs, wal2json


  1. What is best configuration for pg logical replication to fix our issue?
  2. Which is best plugin for logical replication our of below options:
    • wal2json
    • test decoding
    • protobuf

Please provide inputs to fix our issue.

  • Did you add tables to the subscriber? – a_horse_with_no_name Aug 22 '19 at 16:56
  • We are using JDBC replication connection to listen wal .how to add table subscribers ? – vaibhav.patil Aug 22 '19 at 17:01
  • 1
    How can you tell that replication is not working as expected? Does wal2json not receive the subscribed changes? – Laurenz Albe Aug 22 '19 at 17:32
  • yes , I have try even using test_decode plugin in that also I am not getting events from table for changes – vaibhav.patil Aug 22 '19 at 17:35
  • There is one java client I have wrote , which create replication slot and connection. once replication connection connects to slot I am not getting wal events. what is replication configuration do I need to set on server to work this ? gist.githubusercontent.com/vaibhavpatil123/… – vaibhav.patil Aug 22 '19 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.