pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
48.1. Logical Decoding Examples
4+ messages / 3 participants
[nested] [flat]

* 48.1. Logical Decoding Examples
@ 2023-10-22 22:41 PG Doc comments form <noreply@postgresql.org>
  2023-10-23 18:25 ` Re: 48.1. Logical Decoding Examples Euler Taveira <euler@eulerto.com>
  0 siblings, 1 reply; 4+ messages in thread

From: PG Doc comments form @ 2023-10-22 22:41 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: kevinpgcloud@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/logicaldecoding-example.html
Description:

At the beginning of this section, please change this statement: 

Before you can use logical decoding, you must set wal_level to logical and
max_replication_slots to at least 1, and shared_preload_libraries to
'test_decoding'.


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 48.1. Logical Decoding Examples
  2023-10-22 22:41 48.1. Logical Decoding Examples PG Doc comments form <noreply@postgresql.org>
@ 2023-10-23 18:25 ` Euler Taveira <euler@eulerto.com>
  2023-10-23 18:44   ` Re: 48.1. Logical Decoding Examples Kevin Wang <kevinpgcloud@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Euler Taveira @ 2023-10-23 18:25 UTC (permalink / raw)
  To: kevinpgcloud@gmail.com; pgsql-docs@lists.postgresql.org

On Sun, Oct 22, 2023, at 7:41 PM, PG Doc comments form wrote:
> At the beginning of this section, please change this statement: 
> 
> Before you can use logical decoding, you must set wal_level to logical and
> max_replication_slots to at least 1, and shared_preload_libraries to
> 'test_decoding'.
> 

There is no need to preload the output plugin. logical decoding will do it. The
documentation is correct (see LoadOputputPlugin() function).


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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 48.1. Logical Decoding Examples
  2023-10-22 22:41 48.1. Logical Decoding Examples PG Doc comments form <noreply@postgresql.org>
  2023-10-23 18:25 ` Re: 48.1. Logical Decoding Examples Euler Taveira <euler@eulerto.com>
@ 2023-10-23 18:44   ` Kevin Wang <kevinpgcloud@gmail.com>
  2023-10-23 19:49     ` Re: 48.1. Logical Decoding Examples Euler Taveira <euler@eulerto.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Kevin Wang @ 2023-10-23 18:44 UTC (permalink / raw)
  To: Euler Taveira <euler@eulerto.com>; +Cc: pgsql-docs@lists.postgresql.org

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.

On Mon, Oct 23, 2023 at 2:25 PM Euler Taveira <euler@eulerto.com> wrote:

> On Sun, Oct 22, 2023, at 7:41 PM, PG Doc comments form wrote:
>
> At the beginning of this section, please change this statement:
>
> Before you can use logical decoding, you must set wal_level to logical and
> max_replication_slots to at least 1, and shared_preload_libraries to
> 'test_decoding'.
>
>
> There is no need to preload the output plugin. logical decoding will do
> it. The
> documentation is correct (see LoadOputputPlugin() function).
>
>
> --
> Euler Taveira
> EDB   https://www.enterprisedb.com/
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 48.1. Logical Decoding Examples
  2023-10-22 22:41 48.1. Logical Decoding Examples PG Doc comments form <noreply@postgresql.org>
  2023-10-23 18:25 ` Re: 48.1. Logical Decoding Examples Euler Taveira <euler@eulerto.com>
  2023-10-23 18:44   ` Re: 48.1. Logical Decoding Examples Kevin Wang <kevinpgcloud@gmail.com>
@ 2023-10-23 19:49     ` Euler Taveira <euler@eulerto.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Euler Taveira @ 2023-10-23 19:49 UTC (permalink / raw)
  To: Kevin Wang <kevinpgcloud@gmail.com>; +Cc: pgsql-docs@lists.postgresql.org

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/

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2023-10-23 19:49 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-10-22 22:41 48.1. Logical Decoding Examples PG Doc comments form <noreply@postgresql.org>
2023-10-23 18:25 ` Euler Taveira <euler@eulerto.com>
2023-10-23 18:44   ` Kevin Wang <kevinpgcloud@gmail.com>
2023-10-23 19:49     ` Euler Taveira <euler@eulerto.com>

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