From: | Christophe Pettus <xof(at)thebuild(dot)com> |
---|---|
To: | Phillip Diffley <phillip6402(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Create replication slot options |
Date: | 2025-03-25 00:37:30 |
Message-ID: | 74B944FA-9B36-4919-97EF-8E3099A45314@thebuild.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> On Mar 24, 2025, at 17:31, Phillip Diffley <phillip6402(at)gmail(dot)com> wrote:
>
> I am testing out some streaming logical replication commands and am having trouble specifying options when calling CREATE_REPLICATION_SLOT.
>
> I connect to the database with
> psql "dbname=replication_test_db replication=database"
>
> Then I am able to successfully run
> CREATE_REPLICATION_SLOT test_slot LOGICAL pgoutput;
>
> 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"
>
> 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 <output_plugin > 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Sami Imseih | 2025-03-25 01:51:14 | Re: query_id: jumble names of temp tables for better pg_stat_statement UX |
Previous Message | Phillip Diffley | 2025-03-25 00:31:57 | Create replication slot options |