Hi,

Can anyone tell where the file is actually read that is given as input in
the initdb script where "Adding template1 database to pg_database..." is
echoed?

Can anyone tell me how I can run that command line through gdb (I know that
this not a postgres question but if anyone could helpme I would ben
gratefull)?

the commandline is

postgres -boot -C -F -D/usr/local/pgsql/data -d template1 < file.txt

I know how to set the args but not how to get the redirection.



Joost Kraaijeveld

Askesis B.V.
Groenewoudseweg 46
6524VB Nijmegen
tel: 024-3888063
fax: 024-3608416
web: http:/www.askesis.nl


Wed, 30 Sep 1998 15:47:13 +0200
"Joost Kraaijeveld" <JKraaijeveld@askesis.nl>
initdb question
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,
> 
> Can anyone tell where the file is actually read that is given as input in
> the initdb script where "Adding template1 database to pg_database..." is
> echoed?

See pgsql/lib for the *.source files.

> 
> Can anyone tell me how I can run that command line through gdb (I know that
> this not a postgres question but if anyone could helpme I would ben
> gratefull)?
> 
> the commandline is
> 
> postgres -boot -C -F -D/usr/local/pgsql/data -d template1 < file.txt
> 
> I know how to set the args but not how to get the redirection.

Sure.  I usually make a copy of initdb, and call it inittest.  I then
edit the file, and put an 'exit' right before the postgres -boot command
is executed.  I then start the debugger on the postgres binary, and type
the command as though it is being run from initdb, because the initdb
stuff is at the right point to do that.  I can then watch if fail, and
look at the backtrace and output, because it is not being sent to
/dev/null.


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


Thu, 1 Oct 1998 22:01:41 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] initdb question