public inbox for [email protected]
help / color / mirror / Atom feedCreate replication slot options
2+ messages / 2 participants
[nested] [flat]
* Create replication slot options
@ 2025-03-25 00:31 Phillip Diffley <[email protected]>
2025-03-25 00:37 ` Re: Create replication slot options Christophe Pettus <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Phillip Diffley @ 2025-03-25 00:31 UTC (permalink / raw)
To: pgsql-general
I am testing out some streaming logical replication commands and am having
trouble specifying options when calling CREATE_REPLICATION_SLOT
<https://www.postgresql.org/docs/current/protocol-replication.html#PROTOCOL-REPLICATION-CREATE-REPLIC...;
.
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?
Thanks,
Phillip
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Create replication slot options
2025-03-25 00:31 Create replication slot options Phillip Diffley <[email protected]>
@ 2025-03-25 00:37 ` Christophe Pettus <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Pettus @ 2025-03-25 00:37 UTC (permalink / raw)
To: Phillip Diffley <[email protected]>; +Cc: pgsql-general
> On Mar 24, 2025, at 17:31, Phillip Diffley <[email protected]> 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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-03-25 00:37 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-03-25 00:31 Create replication slot options Phillip Diffley <[email protected]>
2025-03-25 00:37 ` Christophe Pettus <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox