[HACKERS] ERROR: "Database 'products', OID nnn, has disappeared from pg_database"

From: "Barnes, Sandy (Sandra)" <Sandy(dot)Barnes(at)Honeywell(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Cc: "Barnes, Sandy (Sandra)" <Sandy(dot)Barnes(at)Honeywell(dot)com>
Subject: [HACKERS] ERROR: "Database 'products', OID nnn, has disappeared from pg_database"
Date: 2001-01-31 18:28:01
Message-ID: 4B3EBD3B46D7D21194B30008C7B1C76505CA5BD8@OLTEX134
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


> Currently, we have been having a problem with some kind of corruption of
> the pg_database file. We are using the database on a limited number of
> writes storage medium. (Compact Flash Card) So that we don't always
> write to the flash, and because we don't care about some of the data, part
> of the database is kept in RAM on a ram file system. We have two
> databases on disk. One database called config, the other the standard
> template1. These are kept in /var/lib/pgsql_base_slave. We have a
> properly init'ed database in /var/lib/pgsql/. When postgresql starts up
> via the init scripts, we create a RAM file system on /var/lib/pgsql/base/,
> and then we create symlinks to the config and template1 databases.
>
> The next set of steps is where we sometimes run into trouble. At
> this point in the init script, we start up the postmaster. Next we do a
> createdb products, where products is the actual name of the database.
> This works fine. Next, we attempt to access the database using psql to
> create a set of tables. This is where sometimes we run into a problem.
> Normally, this works fine, but sometimes we get the error
>
> "Database 'products', OID nnn, has disappeared from pg_database"
>
> where nnn is some number, and forever afterwards we can't access a
> database with that name. Removing and recreating the database doesn't
> help. Neither does vacuuming it. If we delete the whole pgsql directory,
> and recreate it, then use initdb on it, everything is fresh and working
> again, but obviously this isn't a good solution, since we have to recreate
> all the databases, tables, and data.
>
> On the shutdown side, we do a deletedb to remove the products
> database before we shutdown the postmaster. Once that is complete, we do
> a shutdown.
>
> If you need a short list of the startup procedure that is above, here it
> is in a psuedocode fashion.
>
> mount ram drive.
> make symlinks to config and template1 databases
> startup postmaster
> createdb products
> create some tables in products
>
> ... normal operation ...
>
> ... shutdown process
> dropdb products
> shutdown postmaster.
>
>
> I am assuming that some kind of corruption has occured within
> pg_database file, but I don't have the expertise to find where the problem
> is occuring. Any help you can provide would be greatly appreciated.
>
> I am including the init script used.
> <<postgresql.txt>>
>
> Sandy Barnes
> Honeywell
> Business & General Aviation Engineering
> One Technology Center
> 23500 West 105th Street
> Olathe, KS. 66061
> tel 913.712.2027
> fax 913.712.1347
> email sandy(dot)barnes(at)honeywell(dot)com
>

begin 600 postgresql
M(R$(at)+V)I;B]S:`HC('!O<W1G<F5S<6P)5&AI<R!I<R!T:&4@:6YI="!S8W)I
M<'0(at)9F]R('-T87)T:6YG('5P('1H92!0;W-T9W)E4U%,"B,)"7-E<G9E<@H*
M(R!697)S:6]N(#8N-2XS+3(@3&%M87(@3W=E;@HC($%D9&5D(&-O9&4(at)=&\@
M9&5T97)M:6YE(&EF(%!'1$%402!E>&ES=',L('=H971H97(@:70@:7,@8W5R
M<F5N="!V97)S:6]N"B,@("`@(&]R(&YO="P(at)86YD(&EN:71D8B!I9B!N;R!0
M1T1!5$$(at)*&EN:71D8B!W:6QL(&YO="!O=F5R=W)I=&4(at)82!D871A8F%S92DN
M"@HC(%9E<G-I;VX(at)-RXP($QA;7(@3W=E;@HC($%D9&5D(&QO9V=I;F<@8V]D
M90HC($-H86YG960(at)4$=$051!+@H*(R!C:&MC;VYF:6<Z(#,T-2`X-2`Q-0HC
M(&1E<V-R:7!T:6]N.B!3=&%R=',@86YD('-T;W!S('1H92!0;W-T9W)E4U%,
M(&)A8VME;F0(at)9&%E;6]N('1H870@:&%N9&QE<R!<"B,)("`@("`@(&%L;"!D
M871A8F%S92!R97%U97-T<RX*(R!P<F]C97-S;F%M93H@<&]S=&UA<W1E<@HC
M('!I9&9I;&4Z("]V87(O<G5N+W!O<W1M87-T97(N<&ED"B,*"B,@4V]U<F-E
M(&9U;F-T:6]N(&QI8G)A<GDN"BX(at)+V5T8R]R8RYD+VEN:70N9"]F=6YC=&E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0(at)=&%B;&4(at)8F5F;W)E(&MI;&P(at)=&AI<R!P<F]C
M97-S(&]F9BX*"2,*"@ES=2`M;"!P;W-T9W)E<R`M8R`G+W5S<B]L;V-A;"]P
M9W-Q;"]B:6XO9')O<&1B('!R;V1U8W1S)PH*"6MI;&QP<F]C('!O<W1M87-T
M97(*"@DC"@DC(%1I;64(at)=&\(at)=6YM;W5N="!T:&4(at)8F%S92!D:7)E8W1O<GDN
M"@DC"@DC"@H)<VQE97`@,PH)=6UO=6YT("]V87(O;&EB+W!G<W%L+V)A<V4*
M"@H)<VQE97`@,@H)<FT(at)+68@+W9A<B]R=6XO<&]S=&UA<W1E<BYP:60*"7)M
M("UF("]V87(O;&]C:R]S=6)S>7,O<&]S=&=R97-Q;`H)96-H;PH*"@D[.PH@
M('-T871U<RD*"7-T871U<R!P;W-T;6%S=&5R"@D[.PH@(')E<W1A<G0I"@DD
M,"!S=&]P"@DD,"!S=&%R=`H).SL*("`J*0H)96-H;R`B57-A9V4Z('!O<W1G
M<F5S<6P@>W-T87)T?'-T;W!\<W1A='5S?')E<W1A<G1](@H)97AI="`Q"F5S
+86,*"F5X:70@,`H=
`
end

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Lang 2001-01-31 18:36:53 Re: Re: php as stored procedures
Previous Message Raymond Chui 2001-01-31 18:25:25 Why pg_dump doesn't dump the foriegn keys?

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Fork 2001-01-31 18:53:04 Re: Re: grant privileges to a database
Previous Message Martin A. Marques 2001-01-31 18:02:08 Re: grant privileges to a database