Re: 48.1. Logical Decoding Examples

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: 48.1. Logical Decoding Examples
Дата
Msg-id e1e84e8e-b6ac-4984-b029-bba8b203dfd1@app.fastmail.com
обсуждение исходный текст
Ответ на 48.1. Logical Decoding Examples  (PG Doc comments form <noreply@postgresql.org>)
Список 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

В списке pgsql-docs по дате отправления:

Предыдущее
От: Kevin Wang
Дата:
Сообщение: Re: 48.1. Logical Decoding Examples
Следующее
От: Maxim Yablokov
Дата:
Сообщение: Wrong link in the documentation for versions 11, 12