Re: 48.1. Logical Decoding Examples

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "Kevin Wang" <kevinpgcloud(at)gmail(dot)com>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: 48.1. Logical Decoding Examples
Date: 2023-10-23 19:49:39
Message-ID: e1e84e8e-b6ac-4984-b029-bba8b203dfd1@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Oct 23, 2023, at 3:44 PM, Kevin Wang wrote:
> In my testing environment, I did not specify "shared_preload_libraries" and I cannot create the logical replication slot with the "test_decoding" type. test_decoding is in contrib folder and is not build-in, so if you do not specify it, you cannot create the replication slot.

You didn't provide enough information or provide the exact commands and
settings to show the failure.

$ psql -c "show wal_level" -d postgres
wal_level
-----------
logical
(1 row)

$ psql -c "show max_replication_slots" -d postgres
max_replication_slots
-----------------------
1
(1 row)

$ psql -c "show shared_preload_libraries" -d postgres
shared_preload_libraries
--------------------------

(1 row)

$ psql -c "SELECT * FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding', false, true)" -d postgres
slot_name | lsn
-----------------+-----------
regression_slot | 0/6069338
(1 row)

$ psql -c "SELECT slot_name, plugin, slot_type, database, active, restart_lsn, confirmed_flush_lsn FROM pg_replication_slots" -d postgres
slot_name | plugin | slot_type | database | active | restart_lsn | confirmed_flush_lsn
-----------------+---------------+-----------+----------+--------+-------------+---------------------
regression_slot | test_decoding | logical | postgres | f | 0/6069300 | 0/6069338
(1 row)

$ psql -c "SELECT version()" -d postgres
version
---------------------------------------------------------------------------------------------------
PostgreSQL 16.0 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
(1 row)

--
Euler Taveira
EDB https://www.enterprisedb.com/

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Maxim Yablokov 2023-10-24 14:24:24 Wrong link in the documentation for versions 11, 12
Previous Message Kevin Wang 2023-10-23 18:44:20 Re: 48.1. Logical Decoding Examples