Re: Configure Postgres From SQL

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Tom Wilcox <hungrytom(at)gmail(dot)com>
Subject: Re: Configure Postgres From SQL
Date: 2010-07-12 13:55:50
Message-ID: 201007120655.51216.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message tv 2010-07-12 13:56:20 Re: Configure Postgres From SQL
Previous Message Thom Brown 2010-07-12 13:34:26 Re: Configure Postgres From SQL