adding fields to pg_database - Mailing list pgsql-hackers

From Markus Schiltknecht
Subject adding fields to pg_database
Date
Msg-id 1144778074.6682.8.camel@localhost.localdomain
Whole thread Raw
Responses Re: adding fields to pg_database
List pgsql-hackers
Hi,

I'm trying to add fields to pg_database in the system catalog. As long
as I add fixed-size fields before the VAR LENGTH ones, that's all fine.

But adding a VAR LENGTH (text) field initdb fails at: copying template1
to template0. The child process 'postgres' fails with signal 11. Strange
enough I suspect the segfault to occure at program termination (?). That
is just after the following initdb commands have been executed:


...

"REVOKE CREATE,TEMPORARY ON DATABASE template1 FROM public;\n",
"REVOKE CREATE,TEMPORARY ON DATABASE template0 FROM public;\n",

/** Finally vacuum to clean up dead rows in pg_database*/
"VACUUM FULL pg_database;\n",


I've only added the fields in include/catalog/pg_database.h. Do I need
to fiddle other places?

Regards

Markus




pgsql-hackers by date:

Previous
From: Myron Scott
Date:
Subject: Re: Support Parallel Query Execution in Executor
Next
From: Greg Stark
Date:
Subject: Re: Support Parallel Query Execution in Executor