CentOS 7 install PostgreSQL 9.2.7 with data files on SSD

CentOS 7 is much much newer than 6, highly recommended fro any new “Enterprise” build.

It came with the PostgreSQL is 9.2.7, the latest stable is 9.3.5 from PostgreSQL.org at this moment.
I say 9.2 is good enough for me considering the works RedHat has been done to make it fit.

To install it is super easy:

Mount the data directory on SSD

First check the permission:

Add in /etc/fstab:

Mount it manually:

Change the permission:

And don’t forget reboot check permission:

SELinux cause PostgreSQL error: could not connect to server: Permission denied

The php command line works but not the apache page.

Error message:

If you don’t want to be using SELinux then disabling it is an option, but if you prefer the other protection it offers you may just want to enable the specific permission to allow Apache to issue HTTP connections.

As root, running:

How to Schedule PostgreSQL query on Windows

To run one or multip query on Windows at Special time.

I create two files:

D:yourquery.sql

D:PG_JobsPgsql_Daily.bat

Then create schedule job: