Closed kranthi1385 closed 2 weeks ago
Hi @kranthi1385, it looks like client is sending the proto_version = 0 by default although this is configurable option. You can refer here about all the supported output plugin options. There are different ways to specify this option depending upon the driver you are using. For example, it can be supplied using sql function pg_logical_slot_get_changes
as follows:
SELECT * FROM pg_create_logical_replication_slot('test_slot', 'pgoutput', false, true);
SELECT * FROM pg_logical_slot_get_changes('test_slot', NULL, NULL, 'proto_version', '1');
You can check this blog here for more details https://medium.com/@film42/getting-postgres-logical-replication-changes-using-pgoutput-plugin-b752e57bfd58 Additionally, you can provide your replication setup details here as well if you face any issue so that we can help debug it further.
@rishabhtanwar29 I have followed the steps provided above but still getting the error.
ERROR: logical decoding output plugin "pgoutput" produces binary output, but function "pg_logical_slot_get_changes(name,pg_lsn,integer,text[])" expects textual data
SQL state: 0A000
My bad, we should be using pg_logical_slot_get_binary_changes
function instead of pg_logical_slot_get_changes
@rishabhtanwar29 thanks for the update i am able to connect and get the results I have used pg_logical_slot_get_binary_changes pg_logical_slot_get_changes
Hi Experts,
We are trying to configure PGoutput to stream data changes to another destination(flatfile if possible) using logical replication, but we are getting the following error. Can anyone suggest a solution?
ERROR: client sent proto_version=0 but server only supports protocol 1 or higher CONTEXT: slot "repli_slot", output plugin "pgoutput", in the startup callback *