Skip to content

Can't get snapshot working following the documentation #558

@brunotiago

Description

@brunotiago

Describe the bug
I am trying to snapshot and replicate an on prem PG server to a Neon DB instance but I am facing some configuration issues when starting pgstream. I would like to use snapshot_and_replicate but didn't find many documentation about that so I changed to snapshot.

To Reproduce
Steps to reproduce the behavior:

source:
  postgres:
    url: "postgresql://my_user:password@localhost:5432/db?sslmode=disable"
    mode: snapshot
    snapshot:
      mode: full
      tables: ["*"]
      recorder:
        repeatable_snapshots: true
        postgres_url: "postgresql://my_user:password@localhost:5432/db?sslmode=disable"
      snapshot_workers: 4
      data:
        schema_workers: 4
        table_workers: 4
        batch_bytes: 83886080
      schema:
        mode: pgdump_pgrestore
        pgdump_pgrestore:
          clean_target_db: false

target:
  postgres:
    url: "postgresql://neondb_user:neondb_password@neondb_server?sslmode=require&channel_binding=require"
    batch:
      timeout: 5000
      size: 25
    disable_triggers: false
    on_conflict_action: "nothing"
  1. Run command
    pgstream run -c /etc/pgstream/pgstream.yaml --init
  2. Output
    using config file: /etc/pgstream/pgstream.yaml
  3. Error message:
    Error: error setting up postgres replication handler: create postgres replication client: failed to connect to user=root database=: /var/run/postgresql/.s.PGSQL.5432 (/var/run/postgresql): server error: FATAL: role "root" does not exist (SQLSTATE 28000)

Expected behavior
Expected to have pgstream start doing the snapshot of the DB

Setup (please complete the following information):

  • pgstream version: v0.8.3
  • Postgres version: 16.4
  • Postgres environment: self-hosted

Maybe I am missing something on the configuration, but I tried to follow your documentation and doesn't work. Tried snapshot and replicate and had an error Error: no schema snapshot has been configured

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsnapshotSnapshot related work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions