Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id B6BA79FB2C3 for ; Wed, 31 Jan 2007 08:29:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 55391-02 for ; Wed, 31 Jan 2007 08:29:27 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by postgresql.org (Postfix) with ESMTP id 0AAA39FB404 for ; Wed, 31 Jan 2007 08:29:26 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so138530ugf for ; Wed, 31 Jan 2007 04:29:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=YmAdQRhvB3QoQ+cjVxEdikKQWApTsl+4/xTH7JKJAZeuXryRfXfTMKA+SpS+qOn5naks0UDM19xc4SGhNoJ4UiN2dcAVBvjvR3oYnQlretH9ho+4AHd5LqBQ/XSRUw/lta0fc46uVAx8jhnph29B7cvRMVqvXZfWF/gNWfQjuO0= Received: by 10.67.29.12 with SMTP id g12mr954619ugj.1170246565251; Wed, 31 Jan 2007 04:29:25 -0800 (PST) Received: by 10.66.217.13 with HTTP; Wed, 31 Jan 2007 04:29:25 -0800 (PST) Message-ID: <55c095e90701310429r73936cb5g8108e83132f65e56@mail.gmail.com> Date: Wed, 31 Jan 2007 10:29:25 -0200 From: "Ezequias Rodrigues da Rocha" To: "Shoaib Mir" Subject: Re: Log, Logs and more Logs Cc: "Andrew Sullivan" , pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1809_27533752.1170246565043" References: <55c095e90701300901y41197404q4c26032ff0a28e22@mail.gmail.com> <20070130172651.GD32170@phlogiston.dyndns.org> <55c095e90701301041u68c5acc7i99517994724aa6d4@mail.gmail.com> <20070130213304.GA561@phlogiston.dyndns.org> <55c095e90701310335x12d824a4q8798638503e45388@mail.gmail.com> <55c095e90701310404q64c9e33cgc821268cb8723ac@mail.gmail.com> <55c095e90701310412h5a5954dbg11edd0e27231937d@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/175 X-Sequence-Number: 27327 ------=_Part_1809_27533752.1170246565043 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I did it, my pg_log folder was like this: drwxr-xr-x 2 root root 4096 Jan 31 09:36 pg_log Afer I changed to: drwxr-xr-x 2 postgres postgres 4096 Jan 31 09:36 pg_log After this I restart the service (service postgresql restart) ,return to execute an inaceptble sql statement with this return: ERROR: insert or update on table "bil" violates foreign key constraint "fkf97242b3fa73a07c" SQL state: 23503 Detail: Key (xxx_id)=3D(20) is not present in table "ctrac". But the log files doesn't appears on my server. Any help Ezequias 2007/1/31, Shoaib Mir : > > You need to create the folder manually, give the postgres user permission > for write on it and then restart the database server. This way you should= be > able to set the log files in pg_log folder... > > ------------ > Shoaib Mir > EnterpriseDB (www.enterprisedb.com) > > On 1/31/07, Ezequias Rodrigues da Rocha < ezequias.rocha@gmail.com> wrote= : > > > > I restart the server but the pg_log folder doesn't appears. > > > > My log session is like this on postgresql.conf: > > > > # These are only used if redirect_stderr is on: > > log_directory =3D 'pg_log' # Directory where log files are writt= en > > # Can be absolute or relative to PGDATA > > log_filename =3D 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name patte= rn. > > # Can include strftime() escapes > > #log_truncate_on_rotation =3D off # If on, any existing log file of the > > same > > # name as the new log file will be > > # truncated rather than appended to. But > > # such truncation only occurs on > > # time-driven rotation, not on restarts > > # or size-driven rotation. Default is > > # off, meaning append to existing files > > # in all cases. > > #log_rotation_age =3D 1440 # Automatic rotation of logfiles will > > # happen after so many minutes. 0 to > > # disable. > > #log_rotation_size =3D 10240 # Automatic rotation of logfiles wi= ll > > # happen after so many kilobytes of log > > # output. 0 to disable. > > > > Regards... > > Ezequias > > > > 2007/1/31, Ezequias Rodrigues da Rocha < ezequias.rocha@gmail.com >: > > > > > > It was commented. Thank you Shoaib Mir > > > > > > I must restart my server ? > > > > > > Ezequias > > > > > > 2007/1/31, Shoaib Mir < shoaibmir@gmail.com>: > > > > > > > > Check for log_directory setting in your postgresql.conf file... > > > > > > > > ------------- > > > > Shoaib Mir > > > > EnterpriseDB (www.enterprisedb.com) > > > > > > > > On 1/31/07, Ezequias Rodrigues da Rocha > > > > wrote: > > > > > > > > > > I noticed today morning that my pg.log doesn't exist in my server= . > > > > > > > > > > > > > > > Why it occurs ? > > > > > > > > > > My /var/lib/pgsql/data is like that: > > > > > > > > > > [root@linux1 data]# ls -la > > > > > total 92 > > > > > drwx------ 10 postgres postgres 4096 Jan 31 08:35 . > > > > > drwx------ 4 postgres postgres 4096 Jul 26 2006 .. > > > > > drwx------ 7 postgres postgres 4096 Jan 30 12:29 base > > > > > drwx------ 2 postgres postgres 4096 Jan 31 08:44 global > > > > > drwx------ 2 postgres postgres 4096 Feb 17 2006 pg_clog > > > > > -rw------- 1 postgres postgres 3513 Sep 14 15:28 pg_hba.conf > > > > > -rw------- 1 postgres postgres 1460 Feb 17 2006 pg_ident.conf > > > > > drwx------ 4 postgres postgres 4096 Feb 17 2006 pg_multixact > > > > > drwx------ 2 postgres postgres 4096 Jan 28 16:00 pg_subtrans > > > > > drwx------ 2 postgres postgres 4096 Feb 17 2006 pg_tblspc > > > > > drwx------ 2 postgres postgres 4096 Feb 17 2006 pg_twophase > > > > > -rw------- 1 postgres postgres 4 Feb 17 2006 PG_VERSION > > > > > drwx------ 3 postgres postgres 4096 Jan 30 13:14 pg_xlog > > > > > -rw------- 1 postgres postgres 14079 Jan 30 14:42 > > > > > postgresql.conf > > > > > -rw-r--r-- 1 root root 13652 Mar 17 2006 > > > > > postgresql.conf.old > > > > > -rw------- 1 postgres postgres 49 Jan 31 08:36 > > > > > postmaster.opts > > > > > -rw------- 1 postgres postgres 45 Jan 31 08:36 postmaster.pi= d > > > > > [root@linux1 data]# > > > > > > > > > > Can someone tell me how to solve this kind of problem ? > > > > > > > > > > > > > > > Ezequias > > > > > 2007/1/30, Andrew Sullivan : > > > > > > On Tue, Jan 30, 2007 at 04:41:13PM -0200, Ezequias Rodrigues da > > > > > Rocha wrote: > > > > > > > So you are tell me that it is impossible to retrieve it ok ? > > > > > > > > > > > > No. > > > > > > > > > > > > > Just by changing this values (what I did now) it is possible > > > > > to get > > > > > > > the error messages and their statements OK?. > > > > > > > > > > > > Yes, but you need to signal the postmaster to reload its config > > > > > file. > > > > > > Either kill -SIGHUP or restart the postmaster. After that, you > > > > > > should see the statement that caused your error. Note that if > > > > > the > > > > > > UPDATE itself doesn't cause the error, but say a later COMMIT > > > > > (you > > > > > > can get this in serializable mode easily), you'll see the COMMI= T > > > > > as > > > > > > the thing that caused the error. > > > > > > > > > > > > A > > > > > > > > > > > > -- > > > > > > Andrew Sullivan | ajs@crankycanuck.ca > > > > > > Unfortunately reformatting the Internet is a little more painfu= l > > > > > > than reformatting your hard drive when it gets out of whack. > > > > > > --Scott Morris > > > > > > > > > > > > ---------------------------(end of > > > > > broadcast)--------------------------- > > > > > > TIP 1: if posting/reading through Usenet, please send an > > > > > appropriate > > > > > > subscribe-nomail command to majordomo@postgresql.org so > > > > > that your > > > > > > message can get through to the mailing list cleanly > > > > > > > > > > > > > > > > > > > > > -- > > > > > =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D > > > > > Atenciosamente (Sincerely) > > > > > Ezequias Rodrigues da Rocha > > > > > =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D- > > > > > > > > > > A pior das democracias ainda =E9 melhor do que a melhor das > > > > > ditaduras > > > > > The worst of democracies is still better than the better of > > > > > dictatorships > > > > > http://ezequiasrocha.blogspot.com/ > > > > > > > > > > > > > > > > > > > > > > -- > > > =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D > > > Atenciosamente (Sincerely) > > > Ezequias Rodrigues da Rocha > > > > > > =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= - > > > A pior das democracias ainda =E9 melhor do que a melhor das ditaduras > > > The worst of democracies is still better than the better of > > > dictatorships > > > http://ezequiasrocha.blogspot.com/ > > > > > > > > > > > -- > > =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D > > Atenciosamente (Sincerely) > > Ezequias Rodrigues da Rocha > > =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > > A pior das democracias ainda =E9 melhor do que a melhor das ditaduras > > The worst of democracies is still better than the better of > > dictatorships > > http://ezequiasrocha.blogspot.com/ > > > > --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ ------=_Part_1809_27533752.1170246565043 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I did it, my pg_log folder was like this:

drwxr-xr-x   2 root     root &n= bsp;    4096 Jan 31 09:36 pg_log

Afer I change= d to:
drwxr-xr-x   2 postgr= es postgres  4096 Jan 31 09:36 pg_log

After this I restart the service  (service postgresql r= estart) ,return to execute an inaceptble sql statement with this return:
ERROR: insert or update on table "bil" violates foreign key = constraint "fkf97242b3fa73a07c"
SQL state: 23503
Detail: Key (xxx_id)=3D(20) is not present in table= "ctrac".


But the log files doesn't appears on my = server.

Any help

Ezequias<= /span>

2007/1/31, Shoaib Mir <shoaibmir@gmail.com>: You need to create the folder manually, give the postgres user permission f= or write on it and then restart the database server. This way you should be= able to set the log files in pg_log folder...


------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.= com)

On 1/31/07, Ezequias Rodrigues da Rocha < ezequias.rocha@gmail.com> wrote:
I restart the server but the pg_log folder doe= sn't appears.

My log session is like this on postgresql.conf:

# These are only used if redirect_stderr= is on:
log_directory =3D 'pg_log'      = ;  # Directory where log files are written
              &n= bsp;     # Can be absolute or relative to PGDATA
log_file= name =3D 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.<= br>              &nb= sp;     # Can include strftime() escapes
#log_truncate_on= _rotation =3D off # If on, any existing log file of the same=20
              &n= bsp;     # name as the new log file will be
  &= nbsp;               =   # truncated rather than appended to. But
     = ;               # su= ch truncation only occurs on
         = ;           # time-driven rotation,= not on restarts
              &n= bsp;     # or size-driven rotation. Default is
 &nbs= p;               &nb= sp;  # off, meaning append to existing files
    &nb= sp;               # = in all cases.
#log_rotation_age =3D 1440      &= nbsp; # Automatic rotation of logfiles will=20
              &n= bsp;     # happen after so many minutes.  0 to
&nbs= p;               &nb= sp;   # disable.
#log_rotation_size =3D 10240   = ;     # Automatic rotation of logfiles will
  =                 = ;  # happen after so many kilobytes of log
              &n= bsp;     # output.  0 to disable.

Regards= ...
Ezequias

2007/1/31, Ezequias= Rodrigues da Rocha < ezequias.rocha@gmail.com >:
It was commented. Thank you Shoaib Mir

I must restart my server ?

Ezequias

2007/1/31, Shoaib Mir < shoaibmir@gmail.com>:
Check for log_directory setting in your=20 postgresql.conf file...

-------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)


On 1/31/07,=20 Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote= :
I noticed today morning that my pg.log doesn't exist in my server.
=
Why it occurs ?

My /var/lib/p= gsql/data is like that:

[root@linux1 data]# ls -la
total 9= 2
drwx------  10 postgres postgres  4096 Jan 31 08:35= .
drwx------   4 postgres postgres  4096 Jul 26&nbs= p; 2006 ..
drwx------   7 postgres postgres  40= 96 Jan 30 12:29 base
drwx------   2 postgres postgres &nb= sp;4096 Jan 31 08:44 global
drwx------   2 postgres postgres  4096 Feb 17 =  2006 pg_clog
-rw-------   1 postgres postgres  = ;3513 Sep 14 15:28 pg_hba.conf
-rw-------   1 postgres postgre= s  1460 Feb 17  2006 pg_ident.conf
drwx------ &= nbsp; 4 postgres postgres  4096 Feb 17  2006 pg_multixa= ct
drwx------   2 postgres postgres  4096 Jan 28 16:00= pg_subtrans
drwx------   2 postgres postgres  4096 = Feb 17  2006 pg_tblspc
drwx------   2 postgres postg= res  4096 Feb 17  2006 pg_twophase
-rw------- &= nbsp; 1 postgres postgres     4 Feb 17  2006 = PG_VERSION
drwx------   3 postgres postgres  4096 Jan 30 13:14= pg_xlog
-rw-------   1 postgres postgres 14079 Jan 30 14:42 p= ostgresql.conf
-rw-r--r--   1 root     roo= t     13652 Mar 17  2006 postgresql.conf.old<= br>-rw-------   1 postgres postgres    49 Jan= 31 08:36=20 postmaster.opts
-rw-------   1 postgres postgres  &n= bsp; 45 Jan 31 08:36 postmaster.pid
[root@linux1 data]#

Can = someone tell me how to solve this kind of problem ?


Ezequias
2007/1/30, Andrew Sullivan <ajs@crankycanuck.ca>:
> On Tue, Jan 30, 2007 at 04:41:13= PM -0200, Ezequias Rodrigues da Rocha wrote:
> > So you are tell me that it is impossible to retrieve it ok ?
>
> No.
>
> > Just by changing this values (w= hat I did now) it is possible to get
> > the error messages and th= eir statements OK?.
>
> Yes, but you need to signal the postma= ster to reload its config file.
> Either kill -SIGHUP or restart the postmaster.  After th= at, you
> should see the statement that caused your error.  = ;Note that if the
> UPDATE itself doesn't cause the error, but sa= y a later COMMIT (you
> can get this in serializable mode easily), you'll see the COMM= IT as
> the thing that caused the error.
>
> A
> <= br>> --
> Andrew Sullivan  | ajs@crankycanuck.ca
> Unfortunately reformatting the Internet is = a little more painful
> than reformatting your hard drive when it get= s out of whack.
>        &nbs= p;        --Scott Morris
>
>= ; ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropria= te
>        subscribe-nomail = command to majordomo@postgresql.org so that your
>    &n= bsp;   message can get through to the mailing list cleanly
>


--
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D
         &= nbsp;           &nbs= p;            A= tenciosamente (Sincerely)
       &nbs= p;            &= nbsp;   Ezequias Rodrigues da Rocha
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -
A pior das democracias ainda =E9 melhor do que a melhor das ditadurasThe worst of democracies is still better than the better of dictatorships=
http://ezequiasrocha.blogspot.com/




--
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D
=             &nb= sp;            =          Atenciosamente (Since= rely)
            = ;            Ez= equias Rodrigues da Rocha
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -
A pior das democracias ainda =E9 melhor do que a melhor das ditaduras<= br>The worst of democracies is still better than the better of dictatorship= s
http://ezequiasrocha.blo= gspot.com/



--
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D
=             &nb= sp;            =          Atenciosamente (Since= rely)
            = ;            Ez= equias Rodrigues da Rocha
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -
A pior das democracias ainda =E9 melhor do que a melhor das ditaduras<= br>The worst of democracies is still better than the better of dictatorship= s
http://ezequiasrocha.blo= gspot.com/




--
=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D
    = ;            &n= bsp;            = ;     Atenciosamente (Sincerely)
  &n= bsp;            = ;         Ezequias Rodrigues d= a Rocha
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -
A pior das democracias ainda =E9 melhor do que a melhor das ditaduras<= br>The worst of democracies is still better than the better of dictatorship= s
http://ezequiasrocha.blo= gspot.com/ ------=_Part_1809_27533752.1170246565043--