Skip to content

Timeout during COPY command #2

@urish

Description

@urish

Thanks for the detailed instructions!

I'm trying this on my Supabase database acting as a primary server (Pro subscription with Small add-on), and a local testing database acting as the replica.

This goes fine until we get to the largest table, which is ~2GB in size. Then the replication fails due to timeout on the primary side:

Log ID
f6bfc5c7-0bed-4dad-8cb7-0ecdebf7548a

Log Timestamp (UTC)
2022-12-23T16:50:06.306Z

Log Event Message
canceling statement due to statement timeout

Log Metadata
[
  {
    "file": "/var/log/postgresql/postgresql.csv",
    "host": "db-<redacted>",
    "parsed": [
      {
        "application_name": "pg_428762_sync_428374_7177698832877711389",
        "backend_type": "walsender",
        "command_tag": "COPY",
        "connection_from": "<redacted>:61499",
        "context": null,
        "database_name": "postgres",
        "detail": null,
        "error_severity": "ERROR",
        "hint": null,
        "internal_query": null,
        "internal_query_pos": null,
        "leader_pid": null,
        "location": null,
        "process_id": 2434,
        "query": "COPY public.\"ProjectFile\" TO STDOUT",
        "query_id": -4671124835743753000,
        "query_pos": null,
        "session_id": "63a5dbc4.982",
        "session_line_num": 5,
        "session_start_time": "2022-12-23 16:48:04 UTC",
        "sql_state_code": "57014",
        "timestamp": "2022-12-23 16:50:06.306 UTC",
        "transaction_id": 0,
        "user_name": "postgres",
        "virtual_transaction_id": "9/2447"
      }
    ],
    "parsed_from": null,
    "project": "<redacted>",
    "source_type": "file"
  }
]

Any advice on how to make this work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions