Skip to main content

CREATE SNAPSHOT

CREATE SNAPSHOT OF <name> creates a new read-only snapshot of the specified database for read-scaling ducklings. Only one database can be snapshotted per command. In the background, a snapshot of each database is taken every minute to sync changes with read-scaling ducklings. If writing queries are active on a database, the snapshot is skipped to avoid disruption.

To force a snapshot, run CREATE SNAPSHOT manually. This command will wait on any ongoing write queries on the database to complete, and prevent new ones from starting. As soon as all ongoing write queries are completed, the command create the snapshot, ensuring that read-scaling connections can access the most up-to-date data.

Read-scaling instance picks up the latest available snapshot every minute. To minimize delay and ensure access to the latest data, use CREATE SNAPSHOT on the writer connection, followed by a REFRESH DATABASE <name> on the read scaling connection.

CREATE SNAPSHOT OF <database name>;

Lean more about REFRESH DATABASES.