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 1twsIx-000by7-UL for pgsql-general@arkaria.postgresql.org; Tue, 25 Mar 2025 00:38:07 +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 1twsIw-00COSv-I1 for pgsql-general@arkaria.postgresql.org; Tue, 25 Mar 2025 00:38:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1twsIw-00CORt-7M for pgsql-general@lists.postgresql.org; Tue, 25 Mar 2025 00:38:06 +0000 Received: from smtp118.ord1d.emailsrvr.com ([184.106.54.118]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1twsIt-000yXl-3C for pgsql-general@postgresql.org; Tue, 25 Mar 2025 00:38:05 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp7.relay.ord1d.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id A6B092021E; Mon, 24 Mar 2025 20:38:01 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.1\)) Subject: Re: Create replication slot options From: Christophe Pettus In-Reply-To: Date: Mon, 24 Mar 2025 17:37:30 -0700 Cc: pgsql-general@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <74B944FA-9B36-4919-97EF-8E3099A45314@thebuild.com> References: To: Phillip Diffley X-Mailer: Apple Mail (2.3776.700.51.11.1) X-Classification-ID: 2acd1882-c024-4635-9016-075fa0634774-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mar 24, 2025, at 17:31, Phillip Diffley = wrote: >=20 > I am testing out some streaming logical replication commands and am = having trouble specifying options when calling CREATE_REPLICATION_SLOT. >=20 > I connect to the database with > psql "dbname=3Dreplication_test_db replication=3Ddatabase" >=20 > Then I am able to successfully run > CREATE_REPLICATION_SLOT test_slot LOGICAL pgoutput; >=20 > But if I try to specify the snapshot option with > CREATE_REPLICATION_SLOT test_slot_2 LOGICAL pgoutput SNAPSHOT = 'nothing'; > the command fails with "ERROR: syntax error" >=20 > I have tried several combinations of brackets commas and equals signs = but have not been able to get the command with additional options to = work. What is the right syntax to use here? The options after LOGICAL need to be in parentheses: CREATE_REPLICATION_SLOT test_slot_2 LOGICAL pgoutput ( SNAPSHOT = 'nothing' ); In the PostgreSQL documentation, parentheses mean literal parentheses = rather than being part of the grammar.=