Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

  Bruce Momjian                        |
  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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group