Thread: Log, Logs and more Logs

Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
Hi list,

I lost some data becouse my application does not throws an exception
when an update statement report an error.

It is possible to find out if the PostgreSQL could have this error
(and more important the complete statement that make this errors
occurs) ?

I know there are many logs in postgresql but I don't have many
familiarity with all them.

Any help would be glad.

Regards ...

-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=                                 Atenciosamente
(Sincerely)                      Ezequias Rodrigues da
Rocha=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/


Re: Log, Logs and more Logs

From
Andrew Sullivan
Date:
On Tue, Jan 30, 2007 at 03:01:05PM -0200, Ezequias Rodrigues da Rocha wrote:
> I know there are many logs in postgresql but I don't have many
> familiarity with all them.

It's not totally plain what you want to have happen -- whether you
want all queries, whether you merely want ERRORs to show up in your
logs, or whether you want only ERRORS to show their queries.  If it's
the latter, then my suggestion is to set log_min_messages to ERROR
and log_min_error_statement to ERROR as well.

The section of the manual you really want to read is
http://www.postgresql.org/docs/8.2/static/runtime-config-logging.html

A


-- 
Andrew Sullivan  | ajs@crankycanuck.ca
If they don't do anything, we don't need their acronym.    --Josh Hamilton, on the US FEMA


Re: Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
So you are tell me that it is impossible to retrieve it ok ?

Just by changing this values (what I did now) it is possible to get
the error messages and their statements OK?.

My best Regards
Ezequias

2007/1/30, Andrew Sullivan <ajs@crankycanuck.ca>:
> On Tue, Jan 30, 2007 at 03:01:05PM -0200, Ezequias Rodrigues da Rocha wrote:
> > I know there are many logs in postgresql but I don't have many
> > familiarity with all them.
>
> It's not totally plain what you want to have happen -- whether you
> want all queries, whether you merely want ERRORs to show up in your
> logs, or whether you want only ERRORS to show their queries.  If it's
> the latter, then my suggestion is to set log_min_messages to ERROR
> and log_min_error_statement to ERROR as well.
>
> The section of the manual you really want to read is
> http://www.postgresql.org/docs/8.2/static/runtime-config-logging.html
>
> A
>
>
> --
> Andrew Sullivan  | ajs@crankycanuck.ca
> If they don't do anything, we don't need their acronym.
>                 --Josh Hamilton, on the US FEMA
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
>                 http://www.postgresql.org/about/donate
>


-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=                                 Atenciosamente
(Sincerely)                      Ezequias Rodrigues da
Rocha=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/


Re: Log, Logs and more Logs

From
Andrew Sullivan
Date:
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 COMMIT as
the thing that caused the error.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
Unfortunately reformatting the Internet is a little more painful 
than reformatting your hard drive when it gets out of whack.    --Scott Morris


Re: Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
I noticed today morning that my pg.log doesn't exist in my server. <br /><br />Why it occurs ?<br /><br />My <span
style="font-weight:bold;">/var/lib/pgsql/data</span> is like that:<br /><br />[root@linux1 data]# ls -la<br />total 92
<br/>drwx------  10 postgres postgres  4096 Jan 31 08:35 .<br />drwx------   4 postgres postgres  4096 Jul 26  2006
..<br/>drwx------   7 postgres postgres  4096 Jan 30 12:29 base<br />drwx------   2 postgres postgres  4096 Jan 31
08:44global <br />drwx------   2 postgres postgres  4096 Feb 17  2006 pg_clog<br />-rw-------   1 postgres
postgres  3513Sep 14 15:28 pg_hba.conf<br />-rw-------   1 postgres postgres  1460 Feb 17  2006 pg_ident.conf<br
/>drwx------  4 postgres postgres  4096 Feb 17  2006 pg_multixact <br />drwx------   2 postgres postgres  4096 Jan 28
16:00pg_subtrans<br />drwx------   2 postgres postgres  4096 Feb 17  2006 pg_tblspc<br />drwx------   2 postgres
postgres  4096Feb 17  2006 pg_twophase<br />-rw-------   1 postgres postgres     4 Feb 17  2006 PG_VERSION <br
/>drwx------  3 postgres postgres  4096 Jan 30 13:14 pg_xlog<br />-rw-------   1 postgres postgres 14079 Jan 30 14:42
postgresql.conf<br/>-rw-r--r--   1 root     root     13652 Mar 17  2006 postgresql.conf.old<br />-rw-------   1
postgrespostgres    49 Jan 31 08:36 postmaster.opts<br />-rw-------   1 postgres postgres    45 Jan 31 08:36
postmaster.pid<br/>[root@linux1 data]#<br /><br />Can someone tell me how to solve this kind of problem ?<br /><br
/><br/><span style="font-weight: bold;">Ezequias </span><br />2007/1/30, Andrew Sullivan <<a
href="mailto:ajs@crankycanuck.ca">ajs@crankycanuck.ca</a>>:<br/>> On Tue, Jan 30, 2007 at 04:41:13PM -0200,
EzequiasRodrigues da Rocha wrote:<br />> > So you are tell me that it is impossible to retrieve it ok ? <br
/>><br />> No.<br />> <br />> > Just by changing this values (what I did now) it is possible to get<br
/>>> the error messages and their statements OK?.<br />> <br />> Yes, but you need to signal the postmaster
toreload its config file. <br />> Either kill -SIGHUP or restart the postmaster.  After that, you<br />> should
seethe statement that caused your error.  Note that if the<br />> UPDATE itself doesn't cause the error, but say a
laterCOMMIT (you <br />> can get this in serializable mode easily), you'll see the COMMIT as<br />> the thing
thatcaused the error.<br />> <br />> A<br />> <br />> --<br />> Andrew Sullivan  | <a
href="mailto:ajs@crankycanuck.ca">ajs@crankycanuck.ca</a><br />> Unfortunately reformatting the Internet is a little
morepainful<br />> than reformatting your hard drive when it gets out of whack.<br />>                 --Scott
Morris<br/>> <br />> ---------------------------(end of broadcast)--------------------------- <br />> TIP 1:
ifposting/reading through Usenet, please send an appropriate<br />>        subscribe-nomail command to <a
href="mailto:majordomo@postgresql.org">majordomo@postgresql.org</a>so that your<br />>        message can get
throughto the mailing list cleanly <br />> <br /><br /><br />-- <br />
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<br/>                                  Atenciosamente
(Sincerely)<br/>                        Ezequias Rodrigues da Rocha<br />
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br />A pior das democracias ainda é melhor do
quea melhor das ditaduras<br />The worst of democracies is still better than the better of dictatorships<br /><a
href="http://ezequiasrocha.blogspot.com/">http://ezequiasrocha.blogspot.com/</a><br /> 

Re: Log, Logs and more Logs

From
"Shoaib Mir"
Date:
Check for log_directory setting in your postgresql.conf file...

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

On 1/31/07, 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/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.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: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 COMMIT as
> the thing that caused the error.
>
> A
>
> --
> Andrew Sullivan  | ajs@crankycanuck.ca
> Unfortunately reformatting the Internet is a little more painful
> 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
>


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
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 <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/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.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: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 COMMIT as
> the thing that caused the error.
>
> A
>
> --
> Andrew Sullivan  | ajs@crankycanuck.ca
> Unfortunately reformatting the Internet is a little more painful
> 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
>


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
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 = 'pg_log'        # Directory where log files are written
                    # Can be absolute or relative to PGDATA
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
                    # Can include strftime() escapes
#log_truncate_on_rotation = 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 = 1440        # Automatic rotation of logfiles will
                    # happen after so many minutes.  0 to
                    # disable.
#log_rotation_size = 10240        # Automatic rotation of logfiles will
                    # 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 <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/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.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: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 COMMIT as
> the thing that caused the error.
>
> A
>
> --
> Andrew Sullivan  | ajs@crankycanuck.ca
> Unfortunately reformatting the Internet is a little more painful
> 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
>


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/



--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
imad
Date:
Change it in the postgresql.conf file only if you want to make it permanent.
Otherwise just set the variable for your current session without a
server restart.

--Imad
www.EnterpriseDB.com

On 1/31/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> 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 <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/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.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: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 COMMIT as
> > > > the thing that caused the error.
> > > >
> > > > A
> > > >
> > > > --
> > > > Andrew Sullivan  | ajs@crankycanuck.ca
> > > > Unfortunately reformatting the Internet is a little more painful
> > > > 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
> > > >
> > >
> > >
> > > --
> > >
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > >                                   Atenciosamente
> (Sincerely)
> > >                         Ezequias Rodrigues da Rocha
> > >
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> > > A pior das democracias ainda é melhor do que a melhor das ditaduras
> > > The worst of democracies is still better than the better of
> dictatorships
> > > http://ezequiasrocha.blogspot.com/
> > >
> >
> >
>
>
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>                                   Atenciosamente
> (Sincerely)
>                         Ezequias Rodrigues da Rocha
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> A pior das democracias ainda é melhor do que a melhor das ditaduras
> The worst of democracies is still better than the better of dictatorships
> http://ezequiasrocha.blogspot.com/


Re: Log, Logs and more Logs

From
"Shoaib Mir"
Date:
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 = 'pg_log'        # Directory where log files are written
                    # Can be absolute or relative to PGDATA
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
                    # Can include strftime() escapes
#log_truncate_on_rotation = 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 = 1440        # Automatic rotation of logfiles will
                    # happen after so many minutes.  0 to
                    # disable.
#log_rotation_size = 10240        # Automatic rotation of logfiles will
                    # 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 <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/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.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: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 COMMIT as
> the thing that caused the error.
>
> A
>
> --
> Andrew Sullivan  | ajs@crankycanuck.ca
> Unfortunately reformatting the Internet is a little more painful
> 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
>


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/



--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
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)=(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 <shoaibmir@gmail.com>:
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 = 'pg_log'        # Directory where log files are written
                    # Can be absolute or relative to PGDATA
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
                    # Can include strftime() escapes
#log_truncate_on_rotation = 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 = 1440        # Automatic rotation of logfiles will
                    # happen after so many minutes.  0 to
                    # disable.
#log_rotation_size = 10240        # Automatic rotation of logfiles will
                    # 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 <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/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.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: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 COMMIT as
> the thing that caused the error.
>
> A
>
> --
> Andrew Sullivan  | ajs@crankycanuck.ca
> Unfortunately reformatting the Internet is a little more painful
> 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
>


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/



--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
I really don't know how to set it. I created my pg_log on: /var/lib/pgsql/data.

the settings on pgsql.conf is like this:

#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------

# - Where to Log -

#log_destination = 'stderr'        # Valid values are combinations of
                    # stderr, syslog and eventlog,
                    # depending on platform.

# This is used when logging to stderr:
#redirect_stderr = off            # Enable capturing of stderr into log
                    # files


Ezequias
2007/1/31, Joe <dev@freedomcircle.net>:
On Wed, 2007-01-31 at 10:12 -0200, Ezequias Rodrigues da Rocha 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:
                        ^^^^^^^^^^^^^^^^^^^^^^^^
Did you look at the setting of redirect_stderr, and the various logging
settings just above it?

Joe




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
"Shoaib Mir"
Date:
You need to set it like this:

log_destination = 'syslog,stderr'
redirect_stderr = on

and then restart the server. It should show up the log from then onwards....

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

On 1/31/07, Ezequias Rodrigues da Rocha < ezequias.rocha@gmail.com> wrote:
I really don't know how to set it. I created my pg_log on: /var/lib/pgsql/data.

the settings on pgsql.conf is like this:

#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------

# - Where to Log -

#log_destination = 'stderr'        # Valid values are combinations of
                    # stderr, syslog and eventlog,
                    # depending on platform.

# This is used when logging to stderr:
#redirect_stderr = off            # Enable capturing of stderr into log
                    # files


Ezequias
2007/1/31, Joe <dev@freedomcircle.net>:
On Wed, 2007-01-31 at 10:12 -0200, Ezequias Rodrigues da Rocha 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:
                        ^^^^^^^^^^^^^^^^^^^^^^^^
Did you look at the setting of redirect_stderr, and the various logging
settings just above it?

Joe




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
Joe
Date:
On Wed, 2007-01-31 at 10:12 -0200, Ezequias Rodrigues da Rocha 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:                       ^^^^^^^^^^^^^^^^^^^^^^^^
Did you look at the setting of redirect_stderr, and the various logging
settings just above it?

Joe



Re: Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
Great. Now the log is working. Thank you, Thank you, Thank you,

But my statement does not report an error anymore. I really confused now.

Any suggestion ?

Ezequias

2007/1/31, Shoaib Mir <shoaibmir@gmail.com>:
You need to set it like this:

log_destination = 'syslog,stderr'
redirect_stderr = on

and then restart the server. It should show up the log from then onwards....

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

On 1/31/07, Ezequias Rodrigues da Rocha < ezequias.rocha@gmail.com> wrote:
I really don't know how to set it. I created my pg_log on: /var/lib/pgsql/data.

the settings on pgsql.conf is like this:

#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------

# - Where to Log -

#log_destination = 'stderr'        # Valid values are combinations of
                    # stderr, syslog and eventlog,
                    # depending on platform.

# This is used when logging to stderr:
#redirect_stderr = off            # Enable capturing of stderr into log
                    # files


Ezequias
2007/1/31, Joe <dev@freedomcircle.net>:
On Wed, 2007-01-31 at 10:12 -0200, Ezequias Rodrigues da Rocha 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:
                        ^^^^^^^^^^^^^^^^^^^^^^^^
Did you look at the setting of redirect_stderr, and the various logging
settings just above it?

Joe




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
"Shoaib Mir"
Date:
No problemo :)

What was the query and the statement for error? that way we might be able to help...

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

On 1/31/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
Great. Now the log is working. Thank you, Thank you, Thank you,

But my statement does not report an error anymore. I really confused now.

Any suggestion ?

Ezequias

2007/1/31, Shoaib Mir <shoaibmir@gmail.com>:
You need to set it like this:

log_destination = 'syslog,stderr'
redirect_stderr = on

and then restart the server. It should show up the log from then onwards....

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

On 1/31/07, Ezequias Rodrigues da Rocha < ezequias.rocha@gmail.com> wrote:
I really don't know how to set it. I created my pg_log on: /var/lib/pgsql/data.

the settings on pgsql.conf is like this:

#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------

# - Where to Log -

#log_destination = 'stderr'        # Valid values are combinations of
                    # stderr, syslog and eventlog,
                    # depending on platform.

# This is used when logging to stderr:
#redirect_stderr = off            # Enable capturing of stderr into log
                    # files


Ezequias
2007/1/31, Joe <dev@freedomcircle.net>:
On Wed, 2007-01-31 at 10:12 -0200, Ezequias Rodrigues da Rocha 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:
                        ^^^^^^^^^^^^^^^^^^^^^^^^
Did you look at the setting of redirect_stderr, and the various logging
settings just above it?

Joe




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

Re: Log, Logs and more Logs

From
"Ezequias Rodrigues da Rocha"
Date:
Thank you Shoiab,

Now everything is working like I desire. Thank you all very much.

I am notthing without Postgresql community.

Ezequias

2007/1/31, Shoaib Mir <shoaibmir@gmail.com>:
No problemo :)

What was the query and the statement for error? that way we might be able to help...

-------------

Shoaib Mir
EnterpriseDB ( www.enterprisedb.com)

On 1/31/07, Ezequias Rodrigues da Rocha < ezequias.rocha@gmail.com> wrote:
Great. Now the log is working. Thank you, Thank you, Thank you,

But my statement does not report an error anymore. I really confused now.

Any suggestion ?

Ezequias

2007/1/31, Shoaib Mir <shoaibmir@gmail.com>:
You need to set it like this:

log_destination = 'syslog,stderr'
redirect_stderr = on

and then restart the server. It should show up the log from then onwards....

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

On 1/31/07, Ezequias Rodrigues da Rocha < ezequias.rocha@gmail.com> wrote:
I really don't know how to set it. I created my pg_log on: /var/lib/pgsql/data.

the settings on pgsql.conf is like this:

#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------

# - Where to Log -

#log_destination = 'stderr'        # Valid values are combinations of
                    # stderr, syslog and eventlog,
                    # depending on platform.

# This is used when logging to stderr:
#redirect_stderr = off            # Enable capturing of stderr into log
                    # files


Ezequias
2007/1/31, Joe <dev@freedomcircle.net>:
On Wed, 2007-01-31 at 10:12 -0200, Ezequias Rodrigues da Rocha 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:
                        ^^^^^^^^^^^^^^^^^^^^^^^^
Did you look at the setting of redirect_stderr, and the various logging
settings just above it?

Joe




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/




--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/