Re: Understand this error

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Understand this error
Дата
Msg-id 49FA6CC5.2090306@postnewspapers.com.au
обсуждение исходный текст
Ответ на Understand this error  (paulo matadr <saddoness@yahoo.com.br>)
Ответы Re: Understand this error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
paulo matadr wrote:
> Hi all,
> my database entry in mode recovery,
> analyzing my pg_log I seem this:
>
> system logger process (PID 6517) was terminated by signal 9
> background writer process (PID 6519) was terminated by signal 9
> terminating any other active server processes

You haven't told us what OS you are on. Based on the log below, though,
it looks like Linux.

`kill -l' on Linux tells us that signal 9 is SIGKILL, a hard kill. That
should only happen if (a) you send it with `kill -9' or `kill -KILL' or
(b) the machine runs out of memory while in overcommit mode (the
default) and the OOM killer picks PostgreSQL as the process to terminate
to free memory.

You should NOT have your server in overcommit mode if you are running
PostgreSQL. See, in the PostgreSQL manual:

http://www.postgresql.org/docs/current/static/kernel-resources.html#AEN22235

>  kernel:  [<ffffffff800ba475>] out_of_memory+0x53/0x267
[snip]
> kernel: Out of memory: Killed process 6519 (postmaster).

> How prenvent postgres use all memory of system?Why this happen?

Read the link in the PostgreSQL manual, above.

Note that it's not very likely that PostgreSQL was the process that used
up all your memory. It was just unlucky enough to be picked as the one
to be killed, because the OOM killer is terrible at estimating which
process is using the most memory when programs like PostgreSQL have
allocated large blocks of shared memory.

--
Craig Ringer

В списке pgsql-general по дате отправления:

Предыдущее
От: Erick Papadakis
Дата:
Сообщение: Re: retrieving primary key for row with MIN function
Следующее
От: "Carlo Stonebanks"
Дата:
Сообщение: Any way to execute ad-hoc pl/pgsql?