Forrest logo
back to the meroxa tool

meroxa:warp:9e016

Add a Postgres resource with logical replication to the Meroxa Platform
$ meroxa resources create ${resource_name} --type postgres --url "postgres://${pg_username}:${pg_password}@${pg_url}:${pg_port}/${pg_database_name}" --metadata '{"logical_replication":"true"}'
try on your machine

This command creates a resource in Meroxa using the Meroxa CLI. Here is a breakdown of the command:

  • meroxa resources create: This is the command to create a new resource in Meroxa.
  • ${resource_name}: This is a placeholder for the name of the resource you want to create. You should replace it with a meaningful name for your resource.
  • --type postgres: This specifies the type of the resource to create, which is PostgreSQL in this case.
  • --url "postgres://${pg_username}:${pg_password}@${pg_url}:${pg_port}/${pg_database_name}": This specifies the connection URL for the PostgreSQL database. You need to replace ${pg_username}, ${pg_password}, ${pg_url}, ${pg_port}, and ${pg_database_name} with the appropriate values for your PostgreSQL instance.
  • --metadata '{"logical_replication":"true"}': This specifies additional metadata for the resource being created. In this case, it sets the "logical_replication" metadata property to "true". This metadata can be used by Meroxa to configure the resource accordingly.

Overall, this command creates a PostgreSQL resource with the specified connection URL and sets the "logical_replication" metadata property to enable logical replication for the resource.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the meroxa tool