Re: Console Output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alejandro Barragan <alex(dot)barragan(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Console Output
Date: 2012-05-16 13:04:18
Message-ID: 23102.1337173458@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Alejandro Barragan <alex(dot)barragan(at)gmail(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Victor Hugo 2012-05-16 15:48:38 Re: remote connection problem
Previous Message Ilija Vidoevski 2012-05-16 11:43:19 remote connection problem