Skip to content

Ability to set fsync=off with environment variable #968

Closed as not planned
Closed as not planned
@intellix

Description

@intellix

It would be a nice convenience if you could set fsync=off for when using this image in integration tests due to how much of a performance boost it gives (in my case it goes from 300sec -> 40sec) using an environment variable.

So instead of:

db:
  image: postgres
  command: -c fsync=off
  environment:
    - POSTGRES_USER=myuser
    - POSTGRES_PASSWORD=blahblah
    - POSTGRES_DB=mydb

It would be possible to do:

db:
  image: postgres
  environment:
    - POSTGRES_USER=myuser
    - POSTGRES_PASSWORD=blahblah
    - POSTGRES_DB=mydb
    - POSTGRES_FSYNC=off

I'd like to use command: -c fsync=off within my Gitlab CI/CD test step but you only really have access to the env vars for customisation. Currently my workaround is to use bitnami/postgresql which supports it

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions