Обсуждение: Suppressing duplicate key error messages in postgres log?

Поиск
Список
Период
Сортировка

Suppressing duplicate key error messages in postgres log?

От
Larry Lennhoff
Дата:
Hi

I have a postgres table which relies on a unique index to act as a
semaphore to share a resource among many competing processes on several
different servers.  This table is hit multiple times per second.  The
postgres log is being filled by millions of  messages of the sort
ERROR:  Cannot insert a duplicate key into unique index ...

Is there any way to suppress this message so that it won't appear in the
log?  I looked at the documentation and log_min_error_statement looked
promising.  I set it to panic, but the messages continue.  What am I doing
wrong?

Thanks in advance for any assistance

Larry


Re: Suppressing duplicate key error messages in postgres log?

От
Tom Lane
Дата:
Larry Lennhoff <llennhoff-postgres@pexicom.com> writes:
> Is there any way to suppress this message so that it won't appear in the
> log?  I looked at the documentation and log_min_error_statement looked
> promising.  I set it to panic, but the messages continue.  What am I doing
> wrong?

Did you remember to SIGHUP the postmaster after editing postgresql.conf?

            regards, tom lane

Re: Suppressing duplicate key error messages in

От
Larry Lennhoff
Дата:
At 11:59 PM 10/16/2004, Tom Lane wrote:
>Larry Lennhoff <llennhoff-postgres@pexicom.com> writes:
> > Is there any way to suppress this message so that it won't appear in the
> > log?  I looked at the documentation and log_min_error_statement looked
> > promising.  I set it to panic, but the messages continue.  What am I doing
> > wrong?
>
>Did you remember to SIGHUP the postmaster after editing postgresql.conf?

After the crash (caused by the log filling all available disk space) and
restart I tried the following:
pexicast_datran_sg=# show log_min_error_statement;
  log_min_error_statement
-------------------------
  panic
(1 row)

I did not change the value after the restart.  I'm using pexicast
7.3.4.  There are two databases in this instance, both have
log_min_error_statement set to panic.  Let me know if there is anything
else I can tell you that might help.

Larry


Re: Suppressing duplicate key error messages in

От
Tom Lane
Дата:
Larry Lennhoff <llennhoff@pexicom.com> writes:
> Is there any way to suppress this message so that it won't appear in the
> log?  I looked at the documentation and log_min_error_statement looked
> promising.  I set it to panic, but the messages continue.  What am I doing
> wrong?

[ slightly more awake now ... ] Actually, PANIC is already the default
value of log_min_error_statement.  I think what you want is
log_min_messages.

            regards, tom lane

Re: Suppressing duplicate key error messages in

От
Larry Lennhoff
Дата:
At 05:24 PM 10/17/2004, Tom Lane wrote:
>Larry Lennhoff <llennhoff@pexicom.com> writes:
> > Is there any way to suppress this message so that it won't appear in the
> > log?  I looked at the documentation and log_min_error_statement looked
> > promising.  I set it to panic, but the messages continue.  What am I doing
> > wrong?
>
>[ slightly more awake now ... ] Actually, PANIC is already the default
>value of log_min_error_statement.  I think what you want is
>log_min_messages.

Hi

In release 7.3 log_min_messages is called server_min_messages. and setting
that to log and then doing a pg_ctl restart cleared the problem right up.

Thanks for your help

Larry