What Postgres packages are really needed? - postgresql

I have new Vultr Ubuntu 18.04 server on which I plan to install a Rails 5.2 app on Postgres and RVM.
Which Postgres packages are needed for a Rails app? I will use PG Admin to view the database as well.
This tutorial says to install postgresql-common + postgresql-9.5 + libpq-dev
This one says postgresql + postgresql-contrib + libpq-dev
This one says postgresql + postgresql-contrib
Which is the right one? Isn't postgresql-10 better than postgresql-9.5?

you only need postgresql-common and postgresql on the server.
posstgresql-dev is needed if you are compiling clients
pg_admin is usually installed on your desktop, no the server.
version 10 is newer and considered stable by the developers, I'd pick it over 9.x

Related

delete postgresql server from mac

I installed postgresql server on mac with brew install postgres because I want to practice it but it seems I installed the wrong thing? What I need is to run the installer from the official website ?
I cannot find how to uninstall the postgresql server
What you have installed was correct. But if you want to install .dmg package of postgres then you can do that as well.
First, uninstall the current version of Postgres by using
brew uninstall postgres
and then Navigate to the following below URL to get your desire Postgres .dmg package
offical Postgres .dmg for mac
Disclosure: I work for EnterpriseDB (EDB), we create and certify the Mac installers for all supported PostgreSQL versions.

How can I learn ubunu postgresql version as default?

When I install the ubuntu server, the postgresql repository package names are installed on server automatically. So when I type command sudo apt-get install postgresql it will start installation. But which version will be installed? I don't know it.
So how can I learn which version will be installed?

Howto install PostgreSQL 9.6.6 using apt-get on Ubuntu

Is it possible to use apt-get to install a very specific version of PostgreSQL. I would like to install PostgreSQL 9.6.6. I followed the instructions on the postgres download page. This will get the current latest version which is 9.6.7.
Thanks in advance.

How to install pg_dump 9.3.2 on ubuntu?

I am trying to install this specific version of pg_dump, but on apt-get I can only download the 9.3.3 version.
I need this to run a dump on a remote 9.3.2 postgres server.
Thanks.

Error when creating unaccent extension on PostgreSQL

I am trying to configure PostgreSQL to use fulltext search in my rails app as mentioned in this Railscast.
I am using a fresh Ubuntu 12.04 server running PostgreSQL 9.1.5 installed using apt-get with the ppa:pitti/postgresql with precise.
I get the following error when trying to run the migration and when I try the same command in the psql console with the peer postgres user:
postgres=# CREATE EXTENSION unaccent;
ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/unaccent.control":
No such file or directory
In my local box running Ubuntu 10.04 desktop I use the same repository (natty) and it works well.
Any insights would be greatly appreciated.
You need to install the package postgresql-contrib-9.1 in your system first. (Adapt to your version number! Here is the currently available list of packages.) That's the case under Debian, Ubuntu & friends anyway. Using a system user with the necessary privileges:
apt-get install postgresql-contrib-9.1
If your currently logged in user does not have the necessary privileges (but sudo rights):
sudo apt-get install postgresql-contrib-9.1
Quoting the PostgreSQL Apt Repository:
If the version included in your version of Debian is not the one you
want, you can use the PostgreSQL Apt Repository.
There are basic install instructions on the Postgres website for each available OS.
For accent-insensitive indices using unaccent consider this related question:
Does PostgreSQL support "accent insensitive" collations?
On CentOS:
sudo yum install postgres*contrib