On Monday 12 July 2010 6:29:14 am Tom Wilcox wrote:
> Hi,
>
> Is it possible to configure postgres from SQL?
Yes to a degree, see here:
http://www.postgresql.org/docs/8.4/interactive/functions-admin.html
>
> I am interested in turning off fsync for a set of queries (that take
> ages to run) and then turn fsync back on again afterwards.
This is one of the options not covered by above.
See here:
http://www.postgresql.org/docs/8.4/interactive/runtime-config-wal.html
Example:
test=# SELECT current_setting('fsync');
current_setting
-----------------
on
(1 row)
test=# SELECT set_config('fsync','off',false);
ERROR: parameter "fsync" cannot be changed now
>
> Cheers,
> Tom
--
Adrian Klaver
adrian.klaver@gmail.com