Thread: Logging Help Needed

Logging Help Needed

From
"Oakley "
Date:
Being somewhat new to the databasing world, I have done quite a bit of research on the different DB's available and
decidedto go with Postgres. I am working on a system that has to have 3rd level normalization.. As one might be able to
tellsince I am emailing all of you for your help, I am having a problem... I cant get it to log anything other than
whenthe DB comes up, or goes down... 

When I did the configure, I did it with
--enable-syslog and with the --without-CXX
options. I read the online docs and created a
file in the /usr/local/pgsql/data directory
called postgresql.conf, and put in the options
I wanted, those being:

# --------
syslog = 2
debug_level = 2
log_connections = yes
log_timestamp = yes
port = 5432
# --------

(I have seen notes in the mailing list archives that logging to syslog is bad - opinions/insight on this?)

As you might be able to tell from the options
above, I am wanting to keep track of connections
and the time that people connect up to the DB
and what they execute, etc...

Can anyone help? I would greatly appreciate it!


Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

Re: Logging Help Needed

From
Tom Lane
Date:
"Oakley  " <oakerz@eudoramail.com> writes:
> When I did the configure, I did it with
> --enable-syslog and with the --without-CXX
> options. I read the online docs and created a
> file in the /usr/local/pgsql/data directory
> called postgresql.conf, and put in the options
> I wanted, those being:

Sigh.  We've *really* got to rearrange the website so that the most
visible set of docs are for the latest release, not for the development
tip version.  You're trying to use configuration features that will be
in 7.1, but they're not there now.  See the docs that came with 7.0.*
instead.

            regards, tom lane

Re: Re: Logging Help Needed

From
leonbloy@sinectis.com.ar
Date:
>  "Oakley  " <oakerz@eudoramail.com> writes:
>  > When I did the configure, I did it with
>  > --enable-syslog and with the --without-CXX
>  > options. I read the online docs and created a
>  > file in the /usr/local/pgsql/data directory
>  > called postgresql.conf, and put in the options
>  > I wanted, those being:
>
>  Sigh.  We've *really* got to rearrange the website so that the most
>  visible set of docs are for the latest release, not for the development
>  tip version.  You're trying to use configuration features that will be
>  in 7.1, but they're not there now.  See the docs that came with 7.0.*
>  instead.
>
>              regards, tom lane
>

Hee ... I was caught by that one...
http://www.postgresql.org/mhonarc/pgsql-general/2000-06/msg00687.html

So many programs apologize for not having the docs
updated with the software...
Postgres must be the only one having docs on line that
apply to a future version  :-))))

Regards

Hernan

Re: Re: Logging Help Needed

From
"Oakley "
Date:
--

On Mon, 17 Jul 2000 13:19:33   leonbloy wrote:
>>  "Oakley  " <oakerz@eudoramail.com> writes:
>>  > When I did the configure, I did it with
>>  > --enable-syslog and with the --without-CXX
>>  > options. I read the online docs and created a
>>  > file in the /usr/local/pgsql/data directory
>>  > called postgresql.conf, and put in the options
>>  > I wanted, those being:
>>
>>  Sigh.  We've *really* got to rearrange the website so that the most
>>  visible set of docs are for the latest release, not for the development
>>  tip version.  You're trying to use configuration features that will be
>>  in 7.1, but they're not there now.  See the docs that came with 7.0.*
>>  instead.
>>
>>              regards, tom lane
>>
>
>Hee ... I was caught by that one...
>http://www.postgresql.org/mhonarc/pgsql-general/2000-06/msg00687.html
>
>So many programs apologize for not having the docs
>updated with the software...
>Postgres must be the only one having docs on line that
>apply to a future version  :-))))
>
>Regards
>
>Hernan
>

First off, lemme say thanks to everyone... now I have one more thing...

where are the docs that go along with the current version? I have browsed and rebrowsed the site and everything seems
tostick right with the forthcoming version... 

oak


Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

Re: Re: Logging Help Needed

From
Vince Vielhaber
Date:
On Mon, 17 Jul 2000, Oakley   wrote:

>
> --
>
> On Mon, 17 Jul 2000 13:19:33   leonbloy wrote:
> >>  "Oakley  " <oakerz@eudoramail.com> writes:
> >>  > When I did the configure, I did it with
> >>  > --enable-syslog and with the --without-CXX
> >>  > options. I read the online docs and created a
> >>  > file in the /usr/local/pgsql/data directory
> >>  > called postgresql.conf, and put in the options
> >>  > I wanted, those being:
> >>
> >>  Sigh.  We've *really* got to rearrange the website so that the most
> >>  visible set of docs are for the latest release, not for the development
> >>  tip version.  You're trying to use configuration features that will be
> >>  in 7.1, but they're not there now.  See the docs that came with 7.0.*
> >>  instead.
> >>
> >>              regards, tom lane
> >>
> >
> >Hee ... I was caught by that one...
> >http://www.postgresql.org/mhonarc/pgsql-general/2000-06/msg00687.html
> >
> >So many programs apologize for not having the docs
> >updated with the software...
> >Postgres must be the only one having docs on line that
> >apply to a future version  :-))))
> >
> >Regards
> >
> >Hernan
> >
>
> First off, lemme say thanks to everyone... now I have one more thing...
>
> where are the docs that go along with the current version? I have browsed and rebrowsed the site and everything seems
tostick right with the forthcoming version... 

It's not yet ready for prime time, but you can find the docs here:

     http://www.Postgresql.org/users-lounge/index.html

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Re: Logging Help Needed

From
Tom Lane
Date:
leonbloy@sinectis.com.ar writes:
> So many programs apologize for not having the docs
> updated with the software...
> Postgres must be the only one having docs on line that
> apply to a future version  :-))))

Yup ;-).  It's nice having the devel docs up there, but seems like they
ought to be labeled or segregated or something.

I have the following bookmarks:

<A HREF="http://www.postgresql.org/docs/postgres/index.html">PostgreSQL
manual</A> (development version at hub.org).

<A HREF="http://www.postgresql.org/users-lounge/docs/7.0/postgres/postgres.htm">PostgreSQL manual</A> (7.0 release at
hub.org).

            regards, tom lane

Re: Logging Help Needed

From
"Oakley "
Date:
Well, I did some *more* reading, and created the pg_options file which contains:

syslog=0
debug_level=0
log_connections=yes
log_timestamp=yes
showportnumber
port=5432

and restarted the thing with the command: (of course all on one line):

su postgres -c 'nohup /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data -d 4 </dev/null >>/var/log/postgres.log
2>&1'& 

and while I am doing this, I am running a tail -f on the postgres.log file... here is the results of logging in and
runninga query: 

FindExec: found "/usr/local/pgsql/bin/postgres" using argv[0]
binding ShmemCreate(key=52e2c1, size=1104896)
DEBUG:  Data Base System is starting up at Mon Jul 17 12:33:27 2000
DEBUG:  Data Base System was shut down at Mon Jul 17 12:33:06 2000
DEBUG:  Data Base System is in production state at Mon Jul 17 12:33:27 2000
proc_exit(0)
shmem_exit(0)
exit(0)
/usr/local/pgsql/bin/postmaster: reaping dead processes...
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading 4
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading 4
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling writing 4
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading 5
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading 5
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling writing 5
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading 5
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading 5
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling writing 5
/usr/local/pgsql/bin/postmaster: BackendStartup: environ dump:
-----------------------------------------
        PWD=/usr/local/pgsql/data
        HZ=100
        HOSTNAME=skate
        LD_LIBRARY_PATH=/usr/local/pgsql/lib
        MANPATH=:/usr/local/pgsql/man
        USER=root
        MACHTYPE=i386-pc-linux-gnu
        MAIL=/var/spool/mail/root
        LANG=C
        LOGNAME=root
        SHLVL=3
        SHELL=/bin/sh
        HOSTTYPE=i386
        OSTYPE=linux-gnu
        TERM=vt100
        HOME=/usr/local/pgsql
        PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
        POSTPORT=5432
        POSTID=2147483646
        PGDATA=/usr/local/pgsql/data
        IPC_KEY=5432000
        PG_USER=oakley
-----------------------------------------
/usr/local/pgsql/bin/postmaster: BackendStartup: pid 12115 user oakley db oakley
 socket 5
/usr/local/pgsql/bin/postmaster child[12115]: starting with (/usr/local/pgsql/bi
n/postgres -d4 -v131072 -p oakley )
invalid option: /usr/local/pgsql/bin/postmaster
invalid option: 5432invalid option: 64
invalid option: /usr/local/pgsql/bin/postgres
invalid option: 4
invalid option: 32
read_pg_options: /usr/local/pgsql/bin/postmaster,-p,5432,-D,/usr/local/pgsql/dat
a,-B,64,-b,/usr/local/pgsql/bin/postgres,-d,4,-N,32
FindExec: found "/usr/local/pgsql/bin/postgres" using argv[0]
started: host=localhost user=oakley database=oakley
InitPostgres
StartTransactionCommand
query: SELECT usesuper FROM pg_user WHERE usename = 'oakley'
parser outputs:


{ QUERY :command 1  :utility <> :resultRelation 0 :into <> :isPortal false :isBi
nary false :isTemp false :unionall false :distinctClause <> :sortClause <> :rtab
le ({ RTE :relname pg_user :ref { ATTR :relname pg_user :attrs <>} :relid 17280
:inh false :inFromCl true :inJoinSet true :skipAcl false}) :targetlist ({ TARGET
ENTRY :resdom { RESDOM :resno 1 :restype 16 :restypmod -1 :resname usesuper :res
key 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :vara
ttno 5 :vartype 16 :vartypmod -1  :varlevelsup 0 :varnoold 1 :varoattno 5}}) :qu
al { EXPR :typeOid 16  :opType op :oper { OPER :opno 93 :opid 0 :opresulttype 16
 } :args ({ VAR :varno 1 :varattno 1 :vartype 19 :vartypmod -1  :varlevelsup 0 :
 varnoold 1 :varoattno 1} { CONST :consttype 19 :constlen 32 :constisnull false : constvalue  32 [ 11
1 97 107 108 101 121 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]  :constbyval false })} :gr
oupClause <> :havingQual <> :hasAggs false :hasSubLinks false :unionClause <> :intersectClause <> :li
mitOffset <> :limit Count <> :rowMark <>}

plan:

{ SEQSCAN :startup_cost 0.00 :total_cost 1.01 :rows 1 :width 1 :state <> :qptarg etlist ({ TARGETENTR
Y :resdom { RESDOM :resno 1 :restype 16 :restypmod -1 :resname usesuper :reskey 0 :reskeyop 0 :ressor
tgroupref 0 :resjunk false } :expr { VAR :varno 4 :varattno 5 :vartype 16 :vartypmod -1  :varlevelsup
 0 :varnoold 4 :va roattno 5}}) :qpqual ({ EXPR :typeOid 16  :opType op :oper { OPER :opno 93 :opid 6
2 :opresulttype 16 } :args ({ VAR :varno 4 :varattno 1 :vartype 19 :vartypmod -1  :varlevelsup 0 :var
noold 4 :varoattno 1} { CONST :consttype 19 :constlen 32 :constisnull false :constvalue  32 [ 111 97
107 108 101 121 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]  :constbyval false })}) :lefttr
ee <> :righttree <> :extprm () :locprm () :initplan <> :nprm 0  :scanrelid 4 }

ProcessQuery
CommitTransactionCommand
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading 4
proc_exit(0)
shmem_exit(0)
exit(0)
/usr/local/pgsql/bin/postmaster: reaping dead processes...
/usr/local/pgsql/bin/postmaster: CleanupProc: pid 12115 exited with status 0
invalid option: /usr/local/pgsql/data


*whimper* I am starting to wish I never even started this project :P


Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

Re: Logging Help Needed

From
Vince Vielhaber
Date:
On Mon, 17 Jul 2000, Tom Lane wrote:

> leonbloy@sinectis.com.ar writes:
> > So many programs apologize for not having the docs
> > updated with the software...
> > Postgres must be the only one having docs on line that
> > apply to a future version  :-))))
>
> Yup ;-).  It's nice having the devel docs up there, but seems like they
> ought to be labeled or segregated or something.
>
> I have the following bookmarks:
>
> <A HREF="http://www.postgresql.org/docs/postgres/index.html">PostgreSQL
> manual</A> (development version at hub.org).
>
> <A HREF="http://www.postgresql.org/users-lounge/docs/7.0/postgres/postgres.htm">PostgreSQL manual</A> (7.0 release at
hub.org).

It changed from that one, and I don't know how.  Originally it was
users-lounge/7.0/docs/...  Then it became users-lounge/docs/7.0/...
I checked it earlier when it didn't work and now it's:
users-lounge/docs/v7.0/...   I just can't wait to see what it'll become
in August!  so the corrected link is:

http://www.postgresql.org/users-lounge/docs/v7.0/postgres/postgres.htm

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Re: Logging Help Needed

From
Thomas Lockhart
Date:
> > Yup ;-).  It's nice having the devel docs up there, but seems like they
> > ought to be labeled or segregated or something.

Vince, can we re-target the most-visible docs references to point at the
7.0 release docs? I would assume it is just a matter of making or
changing a soft link or two...

                   - Thomas

Re: Logging Help Needed

From
Vince Vielhaber
Date:
On Tue, 18 Jul 2000, Thomas Lockhart wrote:

> > > Yup ;-).  It's nice having the devel docs up there, but seems like they
> > > ought to be labeled or segregated or something.
>
> Vince, can we re-target the most-visible docs references to point at the
> 7.0 release docs? I would assume it is just a matter of making or
> changing a soft link or two...

Should be able to make it happen in the next few days.  I'm about to
freeze the website.  The tool is finally working that will maintain
and create the site (haven't finished the cvs stuff yet, I'll hafta
do them manually).   The only thing that'll be in a frame is the docs,
for all versions.  There is a major problem tho.  When I first started
with the user's lounge I created two directories, 6.5 and 7.0.  Under
those were docs directories.  I remember them being changed to docs/6.5
and docs/7.0 but don't remember why - but that's not the problem.  Last
month I updated the user's lounge even tho it's not ready for consumption
so it'd point to the new locations.  Today I find that they're now v6.5
and v7.0.  I'm not sure what's going on, but for now I just symlinked
it, but it can't keep playing musical chairs.  Is this in a script
somewhere for generating the older docs?

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Re: Logging Help Needed

From
Thomas Lockhart
Date:
> ....  Today I find that they're now v6.5 and v7.0.

I know I was working in there a bit to post the 6.5 and 7.0 docs, and to
get the auto-updating development docs to work. But I can't recall
changing directory structure (though I *may* have done so). Should I
feel guilty, or have you identified another culprit?

Can anyone speak up who had an opinion (or who has dirty hands ;) on
this so Vince can get back to being right-side-up and oriented?

                   - Thomas

Re: Logging Help Needed

From
Vince Vielhaber
Date:
On Tue, 18 Jul 2000, Thomas Lockhart wrote:

> > ....  Today I find that they're now v6.5 and v7.0.
>
> I know I was working in there a bit to post the 6.5 and 7.0 docs, and to
> get the auto-updating development docs to work. But I can't recall
> changing directory structure (though I *may* have done so). Should I
> feel guilty, or have you identified another culprit?

You may have done the original 6.5/docs to docs/6.5, no complaint there.
But docs/6.5 to docs/v6.5 was a surprise.  We need to make sure it's
not going to change again unannounced.

> Can anyone speak up who had an opinion (or who has dirty hands ;) on
> this so Vince can get back to being right-side-up and oriented?

Not necessary unless it happens again.  Then I'm gonna be looking for a
big stick!  :)

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================