---
name: "SLONIK_SET_ADD_SEQUENCE"
section: "7"
platform: "linux"
package: "slony1-2-doc"
version: "2.2.11-6"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SLONIK_SET_ADD_SEQUENCE"
---

# SLONIK\_SET\_ADD\_SEQUENCE(7)

Add a sequence to a Slony-I replication set

## NAME

SET ADD SEQUENCE - Add a sequence to a Slony-I replication set

## SYNOPSIS

FC**SET ADD SEQUENCE (options);**F\[0\]

## DESCRIPTION

Add an existing user sequence to a replication set. The set cannot currently be subscribed by any other node - that functionality is supported by the **SLONIK MERGE** [**SET**(7)](/SET/7.md) command.

- FCSET ID = ival F\[0\]

  ID of the set to which the sequence is to be added.

- FCORIGIN = ival F\[0\]

  Origin node for the set. (optional)

- FCID = ival F\[0\]

  Unique ID of the sequence.

  **Note**

  Note that this ID needs to be unique *across* *sequences* throughout the cluster; the numbering of tables is separate, so you might have a table with ID 20 and a sequence with ID 20, and they would be recognized as separate.

  This parameter is optional.  If this parameter is omitted then slonik will check every node that it can connect to and find the  highest table id being used across all nodes.

- FCFULLY QUALIFIED NAME = 'string' F\[0\]

  The full sequence name including schema name. If FCSEQUENCESF\[0\] is specified then FCFULLY QUALIFIED NAMEF\[0\] should be omitted.

- FCSEQUENCES = 'string' F\[0\]

  A POSIX regular expression that matches to the sequences that should be added to the replication set. This regular expression is passed to postgresql for evaluation on the set origin against fully qualified sequence names. This parameter is optional. If FCFULLY QUALIFIED NAMEF\[0\] is omitted then FCSEQUENCESF\[0\] must be specified.

- FCCOMMENT = 'string' F\[0\]

  A descriptive text added to the sequence entry.

This uses “schemadocsetaddsequence(p\_seq\_comment integer, p\_fqname integer, p\_seq\_id text, p\_set\_id text)” \[not available as a man page\].

## EXAMPLE

```
FC     SET ADD SEQUENCE (
     SET ID = 1,
     ORIGIN = 1,
     ID = 20,
     FULLY QUALIFIED NAME = 'public.tracker_ticket_id_seq',
     COMMENT = 'Support ticket ID sequence'
     );
	 or
	 SET ADD SEQUENCE(
	 SET ID=1,
	 SEQUENCES='public\\.tracker_ticket_id_seq'
	 );
    F[0]
```

## LOCKING BEHAVIOUR

No application-visible locking should take place.

## SLONIK EVENT CONFIRMATION BEHAVIOUR

Slonik waits for the command submitted to the previous event node to be confirmed on the specified event node before submitting this command.

## VERSION INFORMATION

This command was introduced in Slony-I 1.0
