Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling fsync #300

Open
simplenotezy opened this issue Jun 20, 2022 · 2 comments
Open

Disabling fsync #300

simplenotezy opened this issue Jun 20, 2022 · 2 comments

Comments

@simplenotezy
Copy link

I'd like to disable fsync - is there a way to do this with this image?

@ImreSamu
Copy link
Member

Hi simplenotezy,

I'd like to disable fsync - is there a way to do this with this image?

these repo images are just an extension of the docker-library/postgres images
so all upstream customization should work.

see https://github.com/docker-library/docs/blob/master/postgres/README.md#database-configuration

  • "Use a custom config file ...."
  • "Set options directly on the run line. ... "

example:
the postgis/postgis:14-3.2

So check the upstream repo:

And working :

$ docker run -d --name postgis_fsyncoff -e POSTGRES_PASSWORD=mypw postgis/postgis:14-3.2  -c fsync=off -c shared_buffers=720MB -c max_connections=42

$ docker exec -ti postgis_fsyncoff psql -U postgres

psql (14.3 (Debian 14.3-1.pgdg110+1))
Type "help" for help.

postgres=# show fsync;
 fsync 
-------
 off
(1 row)

@Komzpa
Copy link
Member

Komzpa commented Jun 20, 2022

Side note, disabling fsync is usually a bad idea - disabling synchronous_commit brings the perf improvements without the risks instead.

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

No branches or pull requests

3 participants