autovacuum cannot start when connection is full

Started by ITAGAKI Takahiroover 19 years ago4 messageshackers
Jump to latest
#1ITAGAKI Takahiro
itagaki.takahiro@oss.ntt.co.jp

Hi hackers,

Autovacuum uses connections in superuser mode. If all connections are used,
autovacuum cannot start and the following message is written in server log.
| FATAL: sorry, too many clients already

Is this a feature?

The default value of 'superuser_reserved_connections' is 2, so maybe
few people have seen it. Autovacuum can always start in normal use.
(I found it when I tried to make multi-processed autovacuum.)

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: ITAGAKI Takahiro (#1)
Re: autovacuum cannot start when connection is full

ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:

Autovacuum uses connections in superuser mode. If all connections are used,
autovacuum cannot start and the following message is written in server log.
| FATAL: sorry, too many clients already

Is this a feature?

Yes.

I coulda sworn there was a specific mention in the docs that you'd
better allow for autovac when choosing superuser_reserved_connections,
but a quick grep doesn't find it.

regards, tom lane

#3Guillaume Smet
guillaume.smet@gmail.com
In reply to: Tom Lane (#2)
Re: autovacuum cannot start when connection is full

On 8/25/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:

I coulda sworn there was a specific mention in the docs that you'd
better allow for autovac when choosing superuser_reserved_connections,
but a quick grep doesn't find it.

There is a mention in autovacuum doc:
http://www.postgresql.org/docs/8.1/interactive/maintenance.html#AUTOVACUUM

Last sentence of the first paragraph is:
"Also, it's important to allow a slot for the autovacuum process when
choosing the value of superuser_reserved_connections."

--
Guillaume

#4ITAGAKI Takahiro
itagaki.takahiro@oss.ntt.co.jp
In reply to: Guillaume Smet (#3)
Re: autovacuum cannot start when connection is full

"Guillaume Smet" <guillaume.smet@gmail.com> wrote:

There is a mention in autovacuum doc:
http://www.postgresql.org/docs/8.1/interactive/maintenance.html#AUTOVACUUM

Last sentence of the first paragraph is:
"Also, it's important to allow a slot for the autovacuum process when
choosing the value of superuser_reserved_connections."

Thank you!

It may be as well to add the same mention to the description of
superuser_reserved_connections.
| Determines the number of connection "slots" that are reserved for connections
| by PostgreSQL superusers, *including autovacuum*.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center