Re: Console Output - Mailing list pgsql-novice

From Tom Lane
Subject Re: Console Output
Date
Msg-id 23102.1337173458@sss.pgh.pa.us
Whole thread Raw
In response to Console Output  (Alejandro Barragan <alex.barragan@gmail.com>)
List pgsql-novice
Alejandro Barragan <alex.barragan@gmail.com> writes:
> Hi, I am starting to mess around with PostgreSQL source code and wanted to
> print some information to console in relation to pages.  I see that the
> buffer manager (specifically in bufmgr.c) is the best place to access this
> information and I believe I know where I would like to place my code.  Is
> there an easy way to just print this information to a console?  I am pretty
> new at this type of modification so any help would be greatly appreciated

elog(LOG, ...) is a pretty common way of pushing quick-hack debug output
to the postmaster log.  Depending on how you've got the postmaster's log
output configured, plain old fprintf(stderr, ...) might work as well for
slightly less overhead.

            regards, tom lane

pgsql-novice by date:

Previous
From: Francisco Leovey
Date:
Subject: Re: How to select by proximity
Next
From: "Ilija Vidoevski"
Date:
Subject: remote connection problem