Search Postgresql Archives

Re: Configure Different Databases on One Server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok. The reason I wanted to experiment with autovacuum disable for 'ddev2' database is that it is a mostly read-only database -- to support querying from our web apps. I.e. there are only 1 or 2 small tables ever updated all day on it, and only about 20 or so records total per day (compared to 'ddev1' which has much more frequent activity). Also, it's rebuilt periodically from the other db, so I had the idea that we didn't need autovacuum running for 'ddev2'.

However, given that it is connected to the Postgres processes (launcher) and I can't turn it off per database, it may not be worth the trouble to configure this. I plan to experiment with other parameters as well, but this is not critical at this time.

Thanks again.
--Jim Longwill  :^)

On 10/29/2015 01:52 PM, Adrian Klaver wrote:
On 10/29/2015 01:35 PM, Jim Longwill wrote:
Mr. Pierce, others,

I spoke too soon on this.  I'd like to do your alter database.. command
but it isn't working.  I've tried:

postgres=# ALTER DATABASE ddev2 SET autovacuum = off;

both as 'postgres' user, and the ddev2 owner user (which has owner
privs), and I'm always getting this error:

ERROR:  parameter "autovacuum" cannot be changed now

I've checked some documentation, tried many variations of the command,
(e.g. = off, false, 0, etc.) tried other variations as well.  As you can
see in the above example, I'm connected to 'postgres' database. I tried
'ddev2' also, etc. The above error is *always* the response.

I'm certain that there are no other user sessions in this database.

So.. what are the magic words?   Thanks again!


Look for SEE in below:

http://www.postgresql.org/docs/9.4/interactive/runtime-config-autovacuum.html

"autovacuum (boolean)

Controls whether the server should run the autovacuum launcher daemon. This is on by default; however, track_counts must also be enabled for autovacuum to work. SEE--> This parameter can only be set in the postgresql.conf file or on the server command line. <---SEE

Note that even when this parameter is disabled, the system will launch autovacuum processes if necessary to prevent transaction ID wraparound. See Section 23.1.5 for more information.
"




--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux