[PATCH] Don't bail with legitimate -N/-B options

Поиск
Список
Период
Сортировка
Искать
От
Andreas Kling
Тема
[PATCH] Don't bail with legitimate -N/-B options
Дата
Msg-id
47B71932.5060104@acgnystrom.se
Список
Дерево обсуждения
[PATCH] Don't bail with legitimate -N/-B options Andreas Kling <andreas.kling@acgnystrom.se>
Re: [PATCH] Don't bail with legitimate -N/-B options Bruce Momjian <bruce@momjian.us>
Re: [PATCH] Don't bail with legitimate -N/-B options Magnus Hagander <magnus@hagander.net>
Re: [PATCH] Don't bail with legitimate -N/-B options Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] Don't bail with legitimate -N/-B options Peter Eisentraut <peter_e@gmx.net>
Re: [PATCH] Don't bail with legitimate -N/-B options Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] Don't bail with legitimate -N/-B options Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] Don't bail with legitimate -N/-B options Andreas Kling <andreas.kling@acgnystrom.se>
Re: [PATCH] Don't bail with legitimate -N/-B options Magnus Hagander <magnus@hagander.net>
Greetings,

Starting PostgreSQL 8.3.0 with the default options used by Gentoo Linux 
(-N 40 -B 80) causes it to bail with an error message.

"the number of buffers (-B) must be at least twice the number of allowed 
connections (-N) and at least 16"

The problem is that NBuffers is actually "max autovacuum connections" + 
NBuffers.

My attached patch fixes this by adding "max autovacuum connections" * 2 
to NBuffers before the check.

Best regards,
Andreas Kling
ACG Nyström AB
Index: src/backend/postmaster/postmaster.c
===================================================================
--- src/backend/postmaster/postmaster.c	(revision 30129)
+++ src/backend/postmaster/postmaster.c	(working copy)
@@ -685,6 +685,9 @@ PostmasterMain(int argc, char *argv[])
 	/* And switch working directory into it */
 	ChangeToDataDir();
 
+	/* Add buffers to accomodate backends "reserved" for autovacuum */
+	NBuffers += autovacuum_max_workers * 2;
+
 	/*
 	 * Check for invalid combinations of GUC settings.
 	 */
В списке pgsql-bugs по дате отправления
От: Peter Kovacs
Дата:
Сообщение: Re: configure warnings
От: Magnus Hagander
Дата:
FAQ