Re: Feature request: fsync and commit_delay options per database

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Bráulio Bhavamitra <brauliobo(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Feature request: fsync and commit_delay options per database
Date: 2015-06-30 06:43:21
Message-ID: CAMkU=1zBmKZuQ-Md94kV48TGxYHCwes7c84WE3WQ1ge0d4xkkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2015-06-29 15:18 GMT-07:00 Bráulio Bhavamitra <brauliobo(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bráulio Bhavamitra 2015-06-30 11:39:47 Re: Feature request: fsync and commit_delay options per database
Previous Message Andy Erskine 2015-06-30 06:16:35 Re: Turn off streaming replication - leaving Master running