Re: how _not_ to log? - Mailing list pgsql-general

From Tim Spencer
Subject Re: how _not_ to log?
Date
Msg-id C92E3DEA-AF38-4586-9C47-71FB70631D97@cloudpassage.com
Whole thread Raw
In response to Re: how _not_ to log?  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
On Jul 26, 2013, at 11:27 AM, Jeff Janes <jeff.janes@gmail.com> wrote:
> That does not look like the entire message.  What was before and after
> it in the log?
>
> For example:
>
> ERROR:  role "foobar" already exists
> STATEMENT:  create role foobar encrypted password 'XXX';
>
> If it were not for the ERROR, the STATEMENT would not be being logged,
> in my hands.
>
    Ah yes, that's it:

Jul 29 16:12:39 staging-db11 postgres[28849]: [34-1] ERROR:  role "foobar" already exists
Jul 29 16:12:39 staging-db11 postgres[28849]: [34-2] STATEMENT:  create role foobar with replication encrypted password
'XXX';

    Interesting.  I thought I was checking to see if the role existed in the chef recipe, but I guess that's somehow
failingand so it's trying to create the role.  Somehow I spaced that it was doing a create role here instead of an
updateuntil you got me to dig into the log messages more.  :-) 
    I guess I have some work on my end to do to make this work properly.  Thanks, all, for your help, and have fun!

        -tspencer



pgsql-general by date:

Previous
From: Raghavendra
Date:
Subject: Re: how to get UPDATEXML function in postgresql as it works in oracle
Next
From: Tom Jenkinson
Date:
Subject: Re: [BUGS] Incorrect response code after XA recovery