recatalog existing databases after re-build from source

Started by Nonameabout 17 years ago4 messagesgeneral
Jump to latest
#1Noname
gnuoytr@rcn.com

Going through the PLPython threads on the Planet, I realized that I needed plpython. So I rebuilt PG with python, expecting that I could then re-catalog the databases. But, not. initdb, wants the data directory, which is where the database files are, and doesn't run if it's not empty. The data directories have descriptive names like 16431, etc.

These are only small test db's; losing them is not a big deal, but is there a way to get them back?

When I went to createlang I got the no "root" user message, which is why I went to look at initdb. adduser says that postgres user exists, which makes sense.

thanks,
Robert

#2Joshua D. Drake
jd@commandprompt.com
In reply to: Noname (#1)
Re: recatalog existing databases after re-build from source

On Fri, 2009-03-13 at 15:28 -0400, gnuoytr@rcn.com wrote:

Going through the PLPython threads on the Planet, I realied that I needed plpython. So I rebuilt PG with python, expecting that I could then re-catalog the databases. But, not. initdb, wants the data directory, which is where the database files are, and doesn't run if it's not empty. The data directories have descriptive names like 16431, etc.

These are only small test db's; losing them is not a big deal, but is there a way to get them back?

When I went to createlang I got the no "root" user message, which is why I went to look at initdb. adduser says that postgres user exists, which makes sense.

I am having a hard time understanding your problem. Why do you have to
recatalog the databases? Why not just createlang -u postgres?

Joshua D. Drake

thanks,
Robert

--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Joshua D. Drake (#2)
Re: recatalog existing databases after re-build from source

----- "Joshua D. Drake" <jd@commandprompt.com> wrote:

On Fri, 2009-03-13 at 15:28 -0400, gnuoytr@rcn.com wrote:

Going through the PLPython threads on the Planet, I realied that I

needed plpython. So I rebuilt PG with python, expecting that I could
then re-catalog the databases. But, not. initdb, wants the data
directory, which is where the database files are, and doesn't run if
it's not empty. The data directories have descriptive names like
16431, etc.

These are only small test db's; losing them is not a big deal, but

is there a way to get them back?

When I went to createlang I got the no "root" user message, which

is why I went to look at initdb. adduser says that postgres user
exists, which makes sense.

I am having a hard time understanding your problem. Why do you have
to
recatalog the databases? Why not just createlang -u postgres?

Joshua D. Drake

thanks
Robert

--

My guess is he thought he needed to re-initdb the cluster after rebuilding the source to generate plpythonu. Robert, you don't need to do that. As Josh said use createlang to add plpythonu to the database.

Adrian Klaver
aklaver@comcast.net

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Adrian Klaver (#3)
Re: recatalog existing databases after re-build from source

Adrian Klaver <aklaver@comcast.net> writes:

My guess is he thought he needed to re-initdb the cluster after
rebuilding the source to generate plpythonu. Robert, you don't need to
do that.

At least, not as long as it's the same major PG version and you didn't
change any configure options that affect data storage.

regards, tom lane