Skip to content

Disable synchronous commits #1576

@fbac

Description

@fbac

By setting SET LOCAL synchronous_commit = off in transactions such as inserting staged envs, originator envs or batches is specially useful because the tx won't wait for WAL to be flushed to disk.

On hard crash the transactions are completely lost and nothing is written, which should be ok given our architecture:

  • client/gateway would retry a PublishClientEnvelope if inserting a staged envelope fails.
  • xmtpd publish worker would retry publishing a staged envelope
  • migrator retries publishing a batch

Metadata

Metadata

Assignees

No one assigned

    Labels

    service/databaseItems related to the xmtpd database

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions