Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-adminpgsql-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

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

Bill Moran

In response to

pgsql-admin by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group