Can we upgrade to Postgres 9.4?

postgresql

#1

I’m needing Postgres 9.4 for my server. How can I add this? It seems forced to 9


#2

The latest version I see is 9.3. I suppose you can find a ppa or repo with the newer versions and install that. just look for a package for ubuntu 14.04.


#3

The latest version is actually 9.5. I was able to install by following the instructions here:

http://www.postgresql.org/download/linux/ubuntu/


#4

Here’s a step by step on how I was able to do it:

Run the terminal commands:

sudo service postgresql stop

sudo apt-get --purge remove postgresql\*

Write the following to /etc/apt/sources.list.d/pgdg.list

deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main

Run the terminal commands:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

sudo apt-get update

sudo apt-get install postgresql-9.4

Update /etc/postgresql/9.4/main/pg_hba.conf to trust local connections

local   all             postgres                                trust

Finally, start up postgres

sudo service postgresql start

#5

How do we create that folder? Or does it already exist and I can’t see it? Or??

Thanks
Todd


#6

sudo vim /etc/apt/sources.list.d/pgdg.list


#7

Oh yea!! If this works cavneb you get 1,000,000 gold credits directly from me!!


#8

Not sure what that means, but it should work :wink:


#9

Thank you so much! It worked great…


#10

I tried to follow your steps but couldn’t past the

with [quote=“cavneb, post:4, topic:3897”]
local all postgres trust
[/quote]

as I didn’t have permissions to over ride it. How did you get past the?
I also tried to run it with out doing that and got:
FATAL: Peer authentication failed for user “postgres”


#11

@robertburry Are you using sudo to edit the file?


#12

sudo vim to re-write?


#13

I have it working now! I went back in and used sudo vim on

and edited mentioned line. I had to restart the PostgreSQL DB and Start it again.

Thanks for the help.:grin:


#14

For the beginners out there who don’t use vim this might save you some time… You can’t navigate to or create /etc/apt/sources.list.d/pgdg.list without something like vim.

So:

sudo vim /etc/apt/sources.list.d/pgdg.list

Then press i for insert; this allows you to edit a file in vim.

Paste deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main

Then press Esc

Then enter :w to save, then :q to quit vim

Later on, you can again use those commands to edit the trust connections as stated.


#15

If you want to connect to postgres using password instead of socket from localhost, you need edit /etc/postgresql/9.4/main/pg_hba.conf

local   replication     postgres                                md5