Skip to content

test: optimize PostgreSQL testcontainer for faster integration tests#22888

Draft
teleivo wants to merge 1 commit intomasterfrom
postgres-testcontainer-perf
Draft

test: optimize PostgreSQL testcontainer for faster integration tests#22888
teleivo wants to merge 1 commit intomasterfrom
postgres-testcontainer-perf

Conversation

@teleivo
Copy link
Contributor

@teleivo teleivo commented Feb 2, 2026

Summary

  • Disable durability settings (fsync, synchronous_commit, full_page_writes) since test data is disposable
  • Use tmpfs for the PostgreSQL data directory to eliminate disk I/O
  • Configure conservative memory settings (shared_buffers=128MB, work_mem=8MB) suitable for CI and developer machines
  • Reduce WAL overhead with wal_level=minimal and max_wal_senders=0
  • Disable logging overhead (log_statement=none, logging_collector=off)

Disable durability settings (fsync, synchronous_commit, full_page_writes)
since test data is disposable. Use tmpfs for the data directory to
eliminate disk I/O. Configure conservative memory settings suitable for
CI and developer machines.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2026

Copy link
Contributor

@jason-p-pickering jason-p-pickering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants