Re: [HACKERS] initdb question

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: JKraaijeveld(at)askesis(dot)nl (Joost Kraaijeveld)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] initdb question
Date: 1998-10-02 02:01:41
Message-ID: 199810020201.WAA22986@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-10-02 02:18:29 Re: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Previous Message Bruce Momjian 1998-10-02 01:58:09 Re: [HACKERS] SQL92