Thread: Creating new system catalog problems.

Creating new system catalog problems.

From
"Akmal Akmalhojaev"
Date:
Hello.<br /><br />I wanted to create a new system catalog in Postgres. So I changed the source code. Everything seems
tobe OK. I compiled it, but now after initdb I receive:<br /><br />$ initdb -D /usr/home/postgres/post1<br />The files
belongingto this database system will be owned by user "postgres". <br />This user must also own the server process.<br
/><br/>The database cluster will be initialized with locale ru_RU.KOI8-R.<br />The default database encoding has
accordinglybeen set to KOI8.<br /><br />creating directory /usr/home/postgres/post1 ... ok <br />creating
subdirectories... ok<br />selecting default max_connections ... 40<br />selecting default shared_buffers/max_fsm_pages
...28MB/179200<br />creating configuration files ... ok<br />creating template1 database in
/usr/home/postgres/post1/base/1... FATAL:  could <br /> not open relation with OID 2617<br />child process exited with
exitcode 1<br />initdb: removing data directory "/usr/home/postgres/post1"<br /><br />I can't understand the reason.
Cansomebody help me.<br /><br /> Akmal.<br /> 

Re: Creating new system catalog problems.

From
Tom Lane
Date:
"Akmal Akmalhojaev" <akmal.ilh@gmail.com> writes:
> I wanted to create a new system catalog in Postgres. So I changed the source
> code. Everything seems to be OK. I compiled it, but now after initdb I
> receive:
> creating template1 database in /usr/home/postgres/post1/base/1 ... FATAL:
> could
>  not open relation with OID 2617

> I can't understand the reason. Can somebody help me.

Not when you didn't show us what you changed ...

2617 is pg_operator, so a possible theory is that you did something that
tries to access pg_operator before it's been created.  But just adding a
new table declaration in include/catalog shouldn't have that effect.
I suspect you added some code you haven't mentioned.
        regards, tom lane