Problems starting Template1... - Mailing list pgsql-hackers

From luis garcia
Subject Problems starting Template1...
Date
Msg-id 3de424340610231132y5de0b4efj79a47528d33854f1@mail.gmail.com
Whole thread Raw
Responses Re: Problems starting Template1...  (tomas@tuxteam.de)
List pgsql-hackers
Hello, I'm from Venezuela, and I've been making some modifications <br />to Postgre's Catalog, but it seems to be a
problemcreating the Template1 <br />Database. <br /><br />When the creation of the database is starting this is what
happens:<br /><br />luis@Baco:~> /home/luis/pgsql/bin/initdb -D /home/luis/pgsql/data/<br /><span style="font-style:
italic;"><br/>The files belonging to this database system will be owned by user "luis".<br />This user must also own
theserver process. <br /><br />The database cluster will be initialized with locale es_ES.UTF-8.<br />The default
databaseencoding has accordingly been set to UTF8.<br /><br />fixing permissions on existing directory
/home/luis/pgsql/data... ok<br /> creating directory /home/luis/pgsql/data/global ... ok<br />creating directory
/home/luis/pgsql/data/pg_xlog... ok<br />creating directory /home/luis/pgsql/data/pg_xlog/archive_status ... ok<br
/>creatingdirectory /home/luis/pgsql/data/pg_clog ... ok <br />creating directory /home/luis/pgsql/data/pg_subtrans ...
ok<br/>creating directory /home/luis/pgsql/data/pg_twophase ... ok<br />creating directory
/home/luis/pgsql/data/pg_multixact/members... ok<br />creating directory /home/luis/pgsql/data/pg_multixact/offsets ...
ok<br />creating directory /home/luis/pgsql/data/base ... ok<br />creating directory /home/luis/pgsql/data/base/1 ...
ok<br/>creating directory /home/luis/pgsql/data/pg_tblspc ... ok<br />selecting default max_connections ... 100<br />
selectingdefault shared_buffers ... 1000<br />creating configuration files ... </span>ok<br style="font-style: italic;"
/><spanstyle="font-style: italic;">creating template1 database in /home/</span>luis<span style="font-style: italic;">
/</span>pgsql<spanstyle="font-style: italic;">/data/base/1 ... FATAL:  incorrect number of columns in row (expected 32,
got29)</span><br style="font-style: italic;" /><span style="font-style: italic;">child process exited with exit code 1
<br/>initdb: removing contents of data directory "/home/luis/pgsql/data"<br style="font-style: italic;" /></span><span
style="font-style:italic;"></span><br /><br />I just added three more fields to pg_class structure (pg_class.h) just
likethis: <br /><br />.<br />.<br />bool<span style="font-style: italic;">             </span>relhasfrequency<span
style="font-style:italic;">;    /* has time frequency */</span><br style="font-style: italic;" />NameData<span
style="font-style:italic;">     </span>relfrequencytype<span style="font-style: italic;">;  /* table time frequency
type(REAL_TIME, HISTORIC)*/</span><br style="font-style: italic;" />NameData<span style="font-style: italic;">   
</span>relfrequency<spanstyle="font-style: italic;"> ;         /* </span><span style="font-style: italic;">class time
frequencyvalue*/</span><br style="font-style: italic;" /><span style="font-style: italic;">.</span><br />.<br />.<br
/>.<br/><span style="font-style: italic;">#define Natts_pg_class_fixed                 31 </span><br style="font-style:
italic;"/><span style="font-style: italic;">#define Natts_pg_class                          32</span><br
style="font-style:italic;" /><span style="font-style: italic;">#define Anum_pg_class_relname            1 </span><br
style="font-style:italic;" /><span style="font-style: italic;">#define Anum_pg_class_relnamespace  2</span><br
style="font-style:italic;" /><span style="font-style: italic;">.</span><br />.<br />.<br /><span style="font-style:
italic;">DATA(insert OID = 1259 (  pg_class        PGNSP 83 PGUID 0 1259 0 0 0 0 0 f f r 32 0 0 0 0 0 t f f f f null 0
f_null_ ));</span><br style="font-style: italic;" />.<br />.<br />.<br style="font-style: italic;" /><br />-pg_class-
hasoriginally 25 fields, and one of my friends has added four more <br />with no problems, but it seems to be a problem
withthe changes I've made, and<br />we don't know witch is it...<br /><br clear="all" /><br />I also made the next
changesto pg_attribute.h:<br />.<br />.<br />.<br />{ 1259, {"relhasfrequency"},16, -1,    1, 29, 0, -1, -1, true, 'p',
'c',true, false, false, true, 0 }, \ <br />{ 1259, {"relfrequencytype"},       19, -1, NAMEDATALEN, 30, 0, -1, -1,
false,'p', 'i', true, false, false, true, 0 }, \<br />{ 1259, {"relfrequency"},    19, -1, NAMEDATALEN, 31, 0, -1, -1,
false,'p', 'i', true, false, false, true, 0 }, \ <br />{ 1259, {"relacl"},         1034, -1, -1, 32, 1, -1, -1, false,
'x','i', false, false, false, true, 0 }<br />.<br />.<br />.<br />DATA(insert ( 1259,relhasfrequency    16 -1 1 29  0
-1-1 t p c t f f t 0));<br />DATA(insert ( 1259,relfrequencytype        19 -1 NAMEDATALEN    30 0 -1 -1 f p i t f f t
0));<br />DATA(insert ( 1259,relfrequency            19 -1 NAMEDATALEN    31 0 -1 -1 f p i t f f t 0));<br
/>DATA(insert( 1259 relacl          1034 -1 -1 32 1 -1 -1 f x i f f f t 0));<br />.<br />.<br />.<br /><br />If anyone
couldhelp me on this I would be very grateful, because this is the final <br />project of my Career... THANKS<br /><br
/>--<br />Luis D. García M.<br />Telf: 0414-3482018<br /><br />- FACYT - UC -<br />- Computación -  

pgsql-hackers by date:

Previous
From: "Dawid Kuroczko"
Date:
Subject: Re: New CRC algorithm: Slicing by 8
Next
From: "Jim C. Nasby"
Date:
Subject: Re: [PATCHES] smartvacuum() instead of autovacuum