Re: [GENERAL] Inserts hang in DB and error messages in log

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: "Moshe Ben-Shoham" <mosheb(at)nexperience(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Inserts hang in DB and error messages in log
Date: 2009-05-21 13:42:41
Message-ID: 20090521094241.8bc9a4e7.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

In response to "Moshe Ben-Shoham" <mosheb(at)nexperience(dot)com>:
>
> We're working with version 8.3.5-1.
>
> Lately we started seeing insert statements hang in the DB. The
> statements come from two different clients.
>
> When it happens, I see the following messages in the log every second or
> so:
>
> 2009-05-21 08:56:49 IDT ERROR: permission denied to set parameter
> "log_statement"
>
> 2009-05-21 08:56:49 IDT STATEMENT: SET log_statement='none';

[snip the same errors over an over ...]

> Any help (or guidelines for additional required information) is
> appreciated.

It's kind of hard to tell from what you've posted, but I'll take a guess.

First, the inability to turn log_statement off isn't going to cause the
server to hang or pause or anything. This error is _not_ the problem,
although it's probably related, since it's happening in conjunction
with the problem.

Based on that, my guess is that you're running a commercial application
that is trying to hide its SQL from you, thus it refuses to run any
queries unless it can turn log_statement to "none". However, log_statement
can only be changed by a superuser, and I'm betting you did the _right_
thing and didn't make the application user a superuser.

If my guesses are right, the following is true:
* The application is probably garbage. You'll probably have other problems
with it if you continue to use it. You should contact the vendor and
chew them out for their crappy design. Either that or they're so
brilliant that they've managed to write SQL statements that are copyrighted
or something.
* If you give the application user superuser privs, the application will
probably start working.
* You _may_ be able to get the application to start working without
granting superuser privs, simply by setting the value of log_statement
to "none" in the postgresql.conf. This is assuming the application is
smart enough to check the value and only change it if it's not already
"none".

As I said, the advice is all based on guessing, so good luck with it.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ray Stell 2009-05-21 13:48:14 virtual savings
Previous Message Adrian Klaver 2009-05-21 12:51:01 Re: [GENERAL] Inserts hang in DB and error messages in log

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-05-21 13:51:23 Re: fsm on 8.1
Previous Message James B. Byrne 2009-05-21 13:20:31 Re: Help with join syntax sought supplemental