From: Euler Taveira <euler@eulerto.com>
To: Kevin Wang <kevinpgcloud@gmail.com>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: 48.1. Logical Decoding Examples
Date: Mon, 23 Oct 2023 16:49:39 -0300
Message-ID: <e1e84e8e-b6ac-4984-b029-bba8b203dfd1@app.fastmail.com> (raw)
In-Reply-To: <CAAZWVYrWsnjDD=ZTVPpO4J_nqHiVvG0M5w6tfUCfFckv+TP1FA@mail.gmail.com>
References: <169801448603.169907.2109498806563650524@wrigleys.postgresql.org>
<9cf0db97-04d9-4450-b3ea-2374dc7f01af@app.fastmail.com>
<CAAZWVYrWsnjDD=ZTVPpO4J_nqHiVvG0M5w6tfUCfFckv+TP1FA@mail.gmail.com>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: euler@eulerto.com, kevinpgcloud@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: 48.1. Logical Decoding Examples
In-Reply-To: <e1e84e8e-b6ac-4984-b029-bba8b203dfd1@app.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox