Re: [HACKERS] initdb question

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] initdb question
Дата
Msg-id 199810020201.WAA22986@candle.pha.pa.us
обсуждение исходный текст
Ответ на initdb question  ("Joost Kraaijeveld" <JKraaijeveld@askesis.nl>)
Список 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@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] SQL92
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] It sorta works, but I'm confused about locking