Thread: Regarding parallel running of 9.1 and 9.2beta2
Hi, I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 simultaneously with it.Is it possible? I downloaded the 9.2beta2 sources,untared them and ran ./configure,make and make install without uninstalling 9.1. Now,when I am running pg_ctl start,I am getting the following error: pg_ctl start server starting gitc@ubuntu:~/Downloads$ FATAL: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 9.1, which is not compatible with this version 9.2beta2. Please help me.What should I be doing to recover from this error and get back to 9.1? Atri -- Regards, Atri l'apprenant
On Fri, Jun 29, 2012 at 1:47 PM, Atri Sharma <atri.jiit@gmail.com> wrote:
Hi,
I am running PostgreSQL 9.1 currently and I want to run 9.2beta2
simultaneously with it.Is it possible?
Yes, You can have multiple PostgreSQL versions on same host.
I downloaded the 9.2beta2 sources,untared them and ran
./configure,make and make install without uninstalling 9.1.
./configure --prefix=<new location of PostgreSQL 9.2 beta2 binaries>
make
make install
<new location of PostgreSQL 9.2 beta2 binaries>/bin/initdb -D <new data directory location of 9.2beta2>
modify "Port" number in postgresql.conf file located under <new data directory location of 9.2beta2>
<new location of PostgreSQL 9.2 beta2 binaries>/bin/pg_ctl -D <new data directory location of 9.2beta2> start
Now,when I am running pg_ctl start,I am getting the following error:
pg_ctl start
server starting
gitc@ubuntu:~/Downloads$ FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 9.1,
which is not compatible with this version 9.2beta2.
Please help me.What should I be doing to recover from this error and
get back to 9.1?
Suspecting for this error message is, binaries upgraded upto 9.2beta2 & PostgreSQL instance running with PostgreSQL 9.1 binaries and again you are trying to start instance with pg_ctl of 9.2beta2 binary.
Thanks & Regards,
Raghu Ram
On Fri, Jun 29, 2012 at 2:02 PM, raghu ram <raghuchennuru@gmail.com> wrote: > > > On Fri, Jun 29, 2012 at 1:47 PM, Atri Sharma <atri.jiit@gmail.com> wrote: >> >> Hi, >> >> I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 >> simultaneously with it.Is it possible? >> > > Yes, You can have multiple PostgreSQL versions on same host. > >> I downloaded the 9.2beta2 sources,untared them and ran >> ./configure,make and make install without uninstalling 9.1. > > > ./configure --prefix=<new location of PostgreSQL 9.2 beta2 binaries> > > make > > make install > > <new location of PostgreSQL 9.2 beta2 binaries>/bin/initdb -D <new data > directory location of 9.2beta2> > > modify "Port" number in postgresql.conf file located under <new data > directory location of 9.2beta2> > > <new location of PostgreSQL 9.2 beta2 binaries>/bin/pg_ctl -D <new data > directory location of 9.2beta2> start > >> >> >> Now,when I am running pg_ctl start,I am getting the following error: >> >> pg_ctl start >> server starting >> gitc@ubuntu:~/Downloads$ FATAL: database files are incompatible with >> server >> DETAIL: The data directory was initialized by PostgreSQL version 9.1, >> which is not compatible with this version 9.2beta2. >> >> Please help me.What should I be doing to recover from this error and >> get back to 9.1? >> > > Suspecting for this error message is, binaries upgraded upto 9.2beta2 & > PostgreSQL instance running with PostgreSQL 9.1 binaries and again you are > trying to start instance with pg_ctl of 9.2beta2 binary. > > > -- > > Thanks & Regards, > > Raghu Ram > > > Hi Raghu, Thanks for your reply. I ran make install in my 9.1 directory again,and this time,the server started but is giving errors in running the code which was running earlier.Could you tell me a way in which I could remove both 9.1 and 9.2beta2 and build both from scratch and install them independently this time? Atri -- Regards, Atri l'apprenant
Hi Raghu,
Thanks for your reply.
I ran make install in my 9.1 directory again,and this time,the server
started but is giving errors in running the code which was running
earlier.Could you tell me a way in which I could remove both 9.1 and
9.2beta2 and build both from scratch and install them independently
this time?
cd <PostgreSQL 9.1/PostgreSQL 9.2beta2 source directory>
./configure
make distclean
Remove "pgsql" directory from /usr/local
and then you can build both from scratch and install them independently
Thanks & Regards,
Raghu Ram
On 06/29/12 1:43 AM, raghu ram wrote: > > and then you can build both from scratch and install them independently in case noone has made this clear, use different --prefix= paths on the ./configure line, and when you're running initdb and starting the database server, specify different $PGPORT and $PGDATA values. -- john r pierce N 37, W 122 santa cruz ca mid-left coast
On Fri, Jun 29, 2012 at 2:37 PM, John R Pierce <pierce@hogranch.com> wrote: > On 06/29/12 1:43 AM, raghu ram wrote: >> >> >> and then you can build both from scratch and install them independently > > > > in case noone has made this clear, use different --prefix= paths on the > ./configure line, and when you're running initdb and starting the database > server, specify different $PGPORT and $PGDATA values. > > > > -- > john r pierce N 37, W 122 > santa cruz ca mid-left coast > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general Hi John, What values should I be setting in PGDATA and PGPORT? Atri -- Regards, Atri l'apprenant
On Fri, Jun 29, 2012 at 3:14 PM, Atri Sharma <atri.jiit@gmail.com> wrote: > On Fri, Jun 29, 2012 at 2:37 PM, John R Pierce <pierce@hogranch.com> wrote: >> On 06/29/12 1:43 AM, raghu ram wrote: >>> >>> >>> and then you can build both from scratch and install them independently >> >> >> >> in case noone has made this clear, use different --prefix= paths on the >> ./configure line, and when you're running initdb and starting the database >> server, specify different $PGPORT and $PGDATA values. >> >> >> >> -- >> john r pierce N 37, W 122 >> santa cruz ca mid-left coast >> >> >> -- >> Sent via pgsql-general mailing list (pgsql-general@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-general > > Hi John, > > What values should I be setting in PGDATA and PGPORT? > > Atri > -- > Regards, > > Atri > l'apprenant Another thing,I am using the PGXN build in my project but I want the additional flag '-ljvm' also when gcc compiles my project. I added these lines to my makefile: export CFLAGS="$CFLAGS -ljvm" export CXXFLAGS="$CXXFLAGS -ljvm"export CFLAGS="$CFLAGS -ljvm" export CXXFLAGS="$CXXFLAGS -ljvm" This was working before,but now,when I have reinstalled PostgreSQL 9.1.3 from source,I am not able to see the -ljvm flag in my project's compilation and I am getting an error when I am runnning it.How can I include the flag? Atri -- Regards, Atri l'apprenant
Hi John,
What values should I be setting in PGDATA and PGPORT?
Below URL provides more information on this:
Thanks & Regards,
Raghu Ram
On Fri, Jun 29, 2012 at 3:36 PM, raghu ram <raghuchennuru@gmail.com> wrote: >> >> Hi John, >> >> What values should I be setting in PGDATA and PGPORT? >> > > Below URL provides more information on this: > > http://www.postgresql.org/docs/9.1/static/libpq-envars.html > > -- > > Thanks & Regards, > > Raghu Ram > > > Thanks Raghu. BTW,could you solve my other(makefile) issue please? Atri -- Regards, Atri l'apprenant
Thanks Raghu.
BTW,could you solve my other(makefile) issue please?
Atri
Sorry about Makefile issue, someone would have better solution on it..
-Raghu Ram
On Fri, Jun 29, 2012 at 4:20 PM, raghu ram <raghuchennuru@gmail.com> wrote: >> Thanks Raghu. >> >> BTW,could you solve my other(makefile) issue please? >> >> Atri >> >> > Sorry about Makefile issue, someone would have better solution on it.. > > -Raghu Ram > > > No problem,thanks a lot for your help! Atri -- Regards, Atri l'apprenant
On Fri, Jun 29, 2012 at 4:21 PM, Atri Sharma <atri.jiit@gmail.com> wrote: > On Fri, Jun 29, 2012 at 4:20 PM, raghu ram <raghuchennuru@gmail.com> wrote: >>> Thanks Raghu. >>> >>> BTW,could you solve my other(makefile) issue please? >>> >>> Atri >>> >>> >> Sorry about Makefile issue, someone would have better solution on it.. >> >> -Raghu Ram >> >> >> > No problem,thanks a lot for your help! > > Atri > > > -- > Regards, > > Atri > l'apprenant Hi Raghu, After I did what you told me to uninstall,I compiled and installed only 9.2beta2.I am getting this output when I run pg_ctl start: pg_ctl start pg_ctl: another server might be running; trying to start server anyway server starting gitc@ubuntu:~/Downloads/postgresql-9.2beta2$ FATAL: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 9.1, which is not compatible with this version 9.2beta2. Please help. Atri -- Regards, Atri l'apprenant
Atri Sharma wrote: > I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 > simultaneously with it.Is it possible? > > I downloaded the 9.2beta2 sources,untared them and ran > ./configure,make and make install without uninstalling 9.1. > > Now,when I am running pg_ctl start,I am getting the following error: > > pg_ctl start > server starting > gitc@ubuntu:~/Downloads$ FATAL: database files are incompatible with server > DETAIL: The data directory was initialized by PostgreSQL version 9.1, > which is not compatible with this version 9.2beta2. > > Please help me.What should I be doing to recover from this error and > get back to 9.1? Did you overwrite your 9.1 installation (i.e. --prefix was the same for both installations)? If yes, then rebuild and reinstall 9.1, and everything should work. If you did not overwrite 9.1, simply use the 9.1 binaries to start the server. Yours, Laurenz Albe
On Fri, Jun 29, 2012 at 5:12 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote: > Atri Sharma wrote: >> I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 >> simultaneously with it.Is it possible? >> >> I downloaded the 9.2beta2 sources,untared them and ran >> ./configure,make and make install without uninstalling 9.1. >> >> Now,when I am running pg_ctl start,I am getting the following error: >> >> pg_ctl start >> server starting >> gitc@ubuntu:~/Downloads$ FATAL: database files are incompatible with > server >> DETAIL: The data directory was initialized by PostgreSQL version 9.1, >> which is not compatible with this version 9.2beta2. >> >> Please help me.What should I be doing to recover from this error and >> get back to 9.1? > > Did you overwrite your 9.1 installation (i.e. --prefix was the same > for both installations)? > > If yes, then rebuild and reinstall 9.1, and everything should work. > > If you did not overwrite 9.1, simply use the 9.1 binaries to start > the server. > > Yours, > Laurenz Albe Hi Laurenz, Actually,I did not specify --prefix option at all in either case. I rebuilt and reinstalled 9.1,but now,as mentioned earlier,my project is not running successfully on it(I need the -ljvm flag in gcc for compilation.I am using PGXN and I added EXPORT CXXFLAG=$CXXFLAG "-ljvm" and EXPORT CFLAG=$CFLAG "-ljvm" to the makefile of my project.This was working till today morning,when I stupidly installed 9.2beta2 without specifying a new --prefix.) What should I do? Atri -- Regards, Atri l'apprenant
On Fri, Jun 29, 2012 at 6:57 AM, Atri Sharma <atri.jiit@gmail.com> wrote: > On Fri, Jun 29, 2012 at 5:12 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote: >> Atri Sharma wrote: >>> I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 >>> simultaneously with it.Is it possible? >>> >>> I downloaded the 9.2beta2 sources,untared them and ran >>> ./configure,make and make install without uninstalling 9.1. >>> >>> Now,when I am running pg_ctl start,I am getting the following error: >>> >>> pg_ctl start >>> server starting >>> gitc@ubuntu:~/Downloads$ FATAL: database files are incompatible with >> server >>> DETAIL: The data directory was initialized by PostgreSQL version 9.1, >>> which is not compatible with this version 9.2beta2. >>> >>> Please help me.What should I be doing to recover from this error and >>> get back to 9.1? >> >> Did you overwrite your 9.1 installation (i.e. --prefix was the same >> for both installations)? >> >> If yes, then rebuild and reinstall 9.1, and everything should work. >> >> If you did not overwrite 9.1, simply use the 9.1 binaries to start >> the server. >> >> Yours, >> Laurenz Albe > > Hi Laurenz, > > Actually,I did not specify --prefix option at all in either case. > > I rebuilt and reinstalled 9.1,but now,as mentioned earlier,my project > is not running successfully on it(I need the -ljvm flag in gcc for > compilation.I am using PGXN and I added EXPORT CXXFLAG=$CXXFLAG > "-ljvm" and EXPORT CFLAG=$CFLAG "-ljvm" to the makefile of my > project.This was working till today morning,when I stupidly installed > 9.2beta2 without specifying a new --prefix.) > > What should I do? when in doubt, look at the other contrib projects. they use SHLIB_LINK. This was in your old makefile at some point but it was reverted out. merlin
On Fri, Jun 29, 2012 at 7:01 PM, Merlin Moncure <mmoncure@gmail.com> wrote: > On Fri, Jun 29, 2012 at 6:57 AM, Atri Sharma <atri.jiit@gmail.com> wrote: >> On Fri, Jun 29, 2012 at 5:12 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote: >>> Atri Sharma wrote: >>>> I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 >>>> simultaneously with it.Is it possible? >>>> >>>> I downloaded the 9.2beta2 sources,untared them and ran >>>> ./configure,make and make install without uninstalling 9.1. >>>> >>>> Now,when I am running pg_ctl start,I am getting the following error: >>>> >>>> pg_ctl start >>>> server starting >>>> gitc@ubuntu:~/Downloads$ FATAL: database files are incompatible with >>> server >>>> DETAIL: The data directory was initialized by PostgreSQL version 9.1, >>>> which is not compatible with this version 9.2beta2. >>>> >>>> Please help me.What should I be doing to recover from this error and >>>> get back to 9.1? >>> >>> Did you overwrite your 9.1 installation (i.e. --prefix was the same >>> for both installations)? >>> >>> If yes, then rebuild and reinstall 9.1, and everything should work. >>> >>> If you did not overwrite 9.1, simply use the 9.1 binaries to start >>> the server. >>> >>> Yours, >>> Laurenz Albe >> >> Hi Laurenz, >> >> Actually,I did not specify --prefix option at all in either case. >> >> I rebuilt and reinstalled 9.1,but now,as mentioned earlier,my project >> is not running successfully on it(I need the -ljvm flag in gcc for >> compilation.I am using PGXN and I added EXPORT CXXFLAG=$CXXFLAG >> "-ljvm" and EXPORT CFLAG=$CFLAG "-ljvm" to the makefile of my >> project.This was working till today morning,when I stupidly installed >> 9.2beta2 without specifying a new --prefix.) >> >> What should I do? > > when in doubt, look at the other contrib projects. they use > SHLIB_LINK. This was in your old makefile at some point but it was > reverted out. > > merlin I was only doing export CFLAGS="CFLAGS -ljvm" before... -- Regards, Atri l'apprenant
On Fri, Jun 29, 2012 at 7:05 PM, Atri Sharma <atri.jiit@gmail.com> wrote: > On Fri, Jun 29, 2012 at 7:01 PM, Merlin Moncure <mmoncure@gmail.com> wrote: >> On Fri, Jun 29, 2012 at 6:57 AM, Atri Sharma <atri.jiit@gmail.com> wrote: >>> On Fri, Jun 29, 2012 at 5:12 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote: >>>> Atri Sharma wrote: >>>>> I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 >>>>> simultaneously with it.Is it possible? >>>>> >>>>> I downloaded the 9.2beta2 sources,untared them and ran >>>>> ./configure,make and make install without uninstalling 9.1. >>>>> >>>>> Now,when I am running pg_ctl start,I am getting the following error: >>>>> >>>>> pg_ctl start >>>>> server starting >>>>> gitc@ubuntu:~/Downloads$ FATAL: database files are incompatible with >>>> server >>>>> DETAIL: The data directory was initialized by PostgreSQL version 9.1, >>>>> which is not compatible with this version 9.2beta2. >>>>> >>>>> Please help me.What should I be doing to recover from this error and >>>>> get back to 9.1? >>>> >>>> Did you overwrite your 9.1 installation (i.e. --prefix was the same >>>> for both installations)? >>>> >>>> If yes, then rebuild and reinstall 9.1, and everything should work. >>>> >>>> If you did not overwrite 9.1, simply use the 9.1 binaries to start >>>> the server. >>>> >>>> Yours, >>>> Laurenz Albe >>> >>> Hi Laurenz, >>> >>> Actually,I did not specify --prefix option at all in either case. >>> >>> I rebuilt and reinstalled 9.1,but now,as mentioned earlier,my project >>> is not running successfully on it(I need the -ljvm flag in gcc for >>> compilation.I am using PGXN and I added EXPORT CXXFLAG=$CXXFLAG >>> "-ljvm" and EXPORT CFLAG=$CFLAG "-ljvm" to the makefile of my >>> project.This was working till today morning,when I stupidly installed >>> 9.2beta2 without specifying a new --prefix.) >>> >>> What should I do? >> >> when in doubt, look at the other contrib projects. they use >> SHLIB_LINK. This was in your old makefile at some point but it was >> reverted out. >> >> merlin > > I was only doing export CFLAGS="CFLAGS -ljvm" before... > > -- > Regards, > > Atri > l'apprenant SHLIB_LINK worked like a charm.Thanks to my mentor for coming to my rescue(yet again)! Thanks to everybody who assisted me(Laurenz,Raghu,John). Atri Atri -- Regards, Atri l'apprenant