could not link file “pg_xlog/xlogtemp.20” to “pg_xlog/000000010000000000000001” (initialization of log file): Operation not permitted

I am doing a Docker training session and the container uses PostgreSQL for database needs. On doing docker-compose up, i got the error in the title. postgres_1 | postgres_1 | Data page checksums are disabled. postgres_1 | postgres_1 | fixing permissions on existing directory /var/lib/postgresql/data … ok postgres_1 | creating subdirectories … ok postgres_1 | […]

PostgreSQL – useful stuff

(Everything below has been done on FreeBSD 10.1 with PostgreSQL 9.3) How to connect to the PostgreSQL database: su – psql pgsql -U pgsql -d template1 How to list the PostgreSQL databases \l #(that is a lowercase L not an i) How to add a user and grant permissions to a certain PostgreSQL database: psql -U pgsql -d […]