Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qv0wJ-002cYJ-TA for pgsql-docs@arkaria.postgresql.org; Mon, 23 Oct 2023 19:50:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qv0wH-00EaMT-RG for pgsql-docs@arkaria.postgresql.org; Mon, 23 Oct 2023 19:50:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qv0wH-00EaCU-2T for pgsql-docs@lists.postgresql.org; Mon, 23 Oct 2023 19:50:14 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qv0wA-001xNP-8W for pgsql-docs@lists.postgresql.org; Mon, 23 Oct 2023 19:50:12 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id D1BCC3200996; Mon, 23 Oct 2023 15:50:03 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Mon, 23 Oct 2023 15:50:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1698090603; x=1698177003; bh=S/ s7zXgybU91tf3h4A5442IvZ/zvwdH9bOdTN9TPYBw=; b=jkwOCFdWuC4RXaN6A+ yVfX1DypdqcML7G87ZmAax0/D4p+mci3eb+I/xLcX8/LqIGL54XNuDB6k3ZkdVwF mtaoBgTWgGuRpkijpjjprKNKPThqaty73oWE6NMZKexdcmh/5eu3e82fZZdAYtQq ceAey4yYmwbUX7HX/mIXgWCOTAJiPjGDYp5b350Fe3L7fQULrx2qa2/25kr/tmTv aPh9gaV+XeAg+vmmq74vwDhsFT+WBcaJJg6dH/PWNqJVcSVoQ6krrsGP/Pc/kXZA gxBoYFrSDyyh/y7gJCE6N/z446yftZIQkhtAcRMjNLYL4v00VEO6j/QpcOPZsB9y 6n7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1698090603; x=1698177003; bh=S/s7zXgybU91t f3h4A5442IvZ/zvwdH9bOdTN9TPYBw=; b=IjjP5uuOWwtiXzHeQYdfc4jkmQWAU g7k5VbI7+NpyS5EhhDFsMl72v9p8YbLj4hCbRlyJB+O7lScCQC7EN/vAoXYUbplD j3kJnJZk75JPaMAzT8Wa12JPJmC7fLTwBR1nbw3biyXedrODZ2Im2Ze3IjhaZpHQ Sqo3ZG1hIdHixGMPGW2u9Q8k12QxiX0ONr4Xa5uTFEr0U8nz701XT0x2w8F3ZLH1 tIK7h56/Rxl2f5WPjcdE6DKdC1IJVjnVcMP+00cNTDPs2Cu7qK34Im/PQQcXLh1r fd+/OhEN4B3kok2gfTMUcK1Og6AqvEcuHXxlBLfVOi5uZCGY0ygPP+Rtg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeeigddufeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvvefutgesrg dtreerreertdenucfhrhhomhepfdfguhhlvghrucfvrghvvghirhgrfdcuoegvuhhlvghr segvuhhlvghrthhordgtohhmqeenucggtffrrghtthgvrhhnpefgffejvdeivdekvdeivd etudeikeduieevtdfhhfduvdetgeelteeiffekgefhvdenucffohhmrghinhepvghnthgv rhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepvghulhgvrhesvghulhgvrhhtohdrtghomh X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id CF6D115A0091; Mon, 23 Oct 2023 15:50:02 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1048-g9229b632c5-fm-20231019.001-g9229b632 MIME-Version: 1.0 Message-Id: In-Reply-To: References: <169801448603.169907.2109498806563650524@wrigleys.postgresql.org> <9cf0db97-04d9-4450-b3ea-2374dc7f01af@app.fastmail.com> Date: Mon, 23 Oct 2023 16:49:39 -0300 From: "Euler Taveira" To: "Kevin Wang" Cc: pgsql-docs@lists.postgresql.org Subject: Re: 48.1. Logical Decoding Examples Content-Type: multipart/alternative; boundary=f45d2c5068c741a5837859fa88d14125 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --f45d2c5068c741a5837859fa88d14125 Content-Type: text/plain 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/ --f45d2c5068c741a5837859fa88d14125 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Mon, Oct 23,= 2023, at 3:44 PM, Kevin Wang wrote:
In my testing environment, I did n= ot specify "shared_preload_libraries" and I cannot create the logic= al replication slot with the "test_decoding" type. test_decoding is in c= ontrib folder and is not build-in, so if you do not specify it, you cann= ot create the replication slot.

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

$ psql -c "show wal_level" -d postgres
wal_level <= br>
-----------
logical
(1 row)

$ psql -c "show max_replication_slots" -d pos= tgres
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('regres= sion_slot', 'test_decoding', false, true)" -d postgres
&nb= sp;   slot_name    |    lsn = ;   
-----------------+-----------
regression_slot | 0/6069338
(1 row)
$ psql -c "SELECT slot_name, plugin, slot_type, database, a= ctive, restart_lsn, confirmed_flush_lsn FROM pg_replication_slots" -d po= stgres
    slot_name    |&nb= sp;   plugin     | slot_type | database | = active | restart_lsn | confirmed_flush_lsn 
---------= --------+---------------+-----------+----------+--------+-------------+-= --------------------
regression_slot | test_decoding | log= ical   | postgres | f      | 0/606930= 0   | 0/6069338
(1 row)

=
$ psql -c "SELECT version()" -d postgres
  =             =             =             =         version   &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;      
-------------------= ------------------------------------------------------------------------= --------
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
=

--f45d2c5068c741a5837859fa88d14125--