I need to use the new jsonb field in postgres so I decided to upgrade to 9.5 in my ununtu 16.04 LTS. I followed this tutorial , but when it gets to the command pg_upgradecluster 9.3 main, I get the error that cluster configuration already exists. I checked other tutorials and found that I could get the list of clusters with pg_lsclusters. But the command always shows only the 9.3 cluster. Any attempt to create the 9.5 cluster always results to cluster configuration already exists. I purged the 9.5 and installed again multiple times but the same result. At last I decided to purge all the postgres installations I have after backing up my 9.3 cluster with pg_dumpall.
Now I have decided to install the 9.5 freshly but I still get the same thing. When I install pg_lsclusters shows nothing and after starting postgres psql always returns psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Right now I'm so tired and frustrated. Please if anyone has any possible solution or suggestion, help
The problem seemed to be from the version 9.5 in the postgres repositories. I installed 9.6 and everything worked like magic. Had I known there was a stable 9.6 earlier, I wouldn't have wasted 6 hours of my life in something I could have done for 10 minutes. Anyway, I'm happy I have have a working postgres with jsonb field
Related
I had Postgresql 9.6 installed (on Windows 10) and did a complete uninstall including the data directory and all old copies of PgAdmin and there are no environment variables relating to this or any other old Postgres installation either.
I recently installed Postgresql 11 and PgAdmin 4 v3.6 using EnterpriseDB installer. When I run PgAdmin 4 it aurto detects a postgresql instance called 9.6 - though the details tell me it is actually my v11 instance with the same port number and password etc. The only difference is that it is pointing to the non-existent old data directory.
I have searched for a stray postgresql.conf file (and can't find one as it was in the deleted data directory!). As there is also no environment variables, no binaries and no data I can't understand how PgAdmin is auto detecting this ghost. Any suggestions on how to correct it?
EDIT:
I have tried deleting all cookies relating to PgAdmin and Postgresql in Chrome too - this had no effect
I have also double checked that there is no postgresql 9.6 service running (but that just confirms the above where PgAdmin tells me it is called 9.6 but actually is a v11 instance)
Try deleting pgAdmin4 config file pgadmin4.db located at %APPDATA%\pgAdmin\
Restart pgAdmin4 and check.
I know that pgAdmin3 is now obsolete, but I still perfer it to pgAdmin4.
It was working fine up to PostgreSQL 9.* version, but when I try to connect to PostgreSQL 10 database I get:
Is there any workaround for this, or is this truly the end of pgAdmin III?
The official pgAdmin3 has issues with PgSQL 10 and is no longer being developed, but there is a fork available at https://www.openscg.com/bigsql/pgadmin3/ which does work, and will continue to receive updates.
I have very frustrating issue...
I have two versions of postgresql installed - 8.4 and 9.1, I have dump of a database made on another machine with postrgresql-9.1 and I want to restore it.
Of course using postgresql-8.4 to do this I get:
unsupported version (1.12) in file header
I know that there is a lot questions about same issue, but everywhere the answer is - "change port in conf" or something like this.
But it doesn't help me - I have stopped postgresql-8.4 server at all, but I still can't restore database. And when I log to postgres user in ubuntu and type psql --version the output goes:
psql (PostgreSQL) 8.4.22
So, my question is how to change this behavior and force user postgres to use tools of postgresql-9.1?
And please don't tell me about port - when I type service postgresql status I get:
Running clusters:
Running clusters: 9.1/main
I have upgraded from 9.2 to 9.3 successfully on ubuntu. However,
/etc/init.d/postgresql start
starts both 9.2 and 9.3
Although the above command can accept that the version number and successfully starts and stops each one, is there any method I can use to make this command start 9.3 only.
The reason is that, I am not able to reboot the system now, but I am afraid when it is rebooted both servers can start.
My short term solution is to adjust the port numbers to make my application use 9.3 database. However, I would like to learn about more permanent and robust solutions.
Thanks in advance,
Steve
Ubuntu uses pg_wrapper to manage PostgreSQL installs. See the Ubuntu PostgreSQL wiki page.
You'll want to pg_dropcluster the 9.2 cluster, if you wish to actually destroy the old data. Or un-install PostgreSQL 9.2. Or modify the config file (don't remember the name right now) in /etc/postgresql/9.2/ that controls whether Pg starts or not. It's called something like start.conf or pg_ctl.conf or something.
You may also want to reverse the configured ports so your new 9.3 runs on 5432 and your not-started-by-default 9.2 tuns on 5433. That is in postgresql.conf.
Steve Harman's response worked perfectly for me, too:
Thanks for the response. In the /etc/postgresql/9.2/main/ directory, there is start.conf. If you change the single line in that file from 'auto' to 'disabled' then, /etc/init.d/postgresql start will not start 9.2. – Steve Harman Jan 1 at 16:55
On the other hand, just fyi, the command output is that both versions of the server are starting (which is not true and is coming from the service starting scripts)
user#server:/etc/postgresql/9.3/main$ sudo service postgresql start
* Starting PostgreSQL 9.1 database server
...done.
* Starting PostgreSQL 9.3 database server
...done.
I'm having some problems with replication in pgAdmin. It says:
Slony creation scripts not available.
I use File > Options and indicate the path "usr/share/slony" where I suppose they are. Because that directory has xxid.v80.sql and all of them.
My problem is, pgAdmin still doesn't recognize the creation scripts for the cluster.
My setup: SO-Ubuntu, pgAdmin, PostgreSQL 8.4
Any ideas?
for some reason version 1.2 of slony has some troubles with pgadmin3 1.10 or postgres 8.4 (That's what I asume). I just uninstalled version of slony from sinaptyc and installed slony v2.0.6 from source (slony1.tar.bz2) and everything worked fine for postgres 8.4
Hope this helps,