Re: Feature request: fsync and commit_delay options per database - Mailing list pgsql-general

From Jeff Janes
Subject Re: Feature request: fsync and commit_delay options per database
Date
Msg-id CAMkU=1zBmKZuQ-Md94kV48TGxYHCwes7c84WE3WQ1ge0d4xkkg@mail.gmail.com
Whole thread Raw
In response to Feature request: fsync and commit_delay options per database  (Bráulio Bhavamitra <brauliobo@gmail.com>)
Responses Re: Feature request: fsync and commit_delay options per database  (Bráulio Bhavamitra <brauliobo@gmail.com>)
List pgsql-general
2015-06-29 15:18 GMT-07:00 Bráulio Bhavamitra <brauliobo@gmail.com>:
Hello all,

After reading http://stackoverflow.com/questions/9407442/optimise-postgresql-for-fast-testing
I've tried to use commit_delay to make commits really slow on a test
environment. Unfortunetely, the maximum value is 100ms (100_000
microseconds).

Besides increasing it, it would be great to have these two options
(fsync and commit_delay) per database, that is, valid only for
databases configured with them. That would greatly speed up test
running and still make the cluster available for other "real"
databases.

Is this feature or something similar planned?

fsync is inherently across the cluster, so that can't be set per database.  You can configure a different commit_delay in each database on the cluster using "alter database jjanes set commit_delay to 1000;" for example, but if different databases have different settings they will interact with each other in complex, unintuitive ways.  And it is not really clear what you are trying to accomplish by doing this.

Running multiple clusters on the same server is pretty easy to do, as long your client allows you configure which port number it connects to.  If you really want fsync on for one database and off for another one, but each database in a different cluster.

Cheers,

Jeff

pgsql-general by date:

Previous
From: Andy Erskine
Date:
Subject: Re: Turn off streaming replication - leaving Master running
Next
From: Bráulio Bhavamitra
Date:
Subject: Re: Feature request: fsync and commit_delay options per database