Understand the default configuration
The default configuration consists of:
- A database cluster or directory under which all data will be stored. The default data directory in Bitnami is located at /opt/bitnami/postgresql/data.
- Every connection to the PostgreSQL database server is made using the name of some particular role. A database superuser bypasses all permission checks, except the right to log in. Bitnami configures a default superuser role with a name of postgres. The postgres role has remote access to the database.
Check our recommendations for a production server.
PostgreSQL version
To obtain the PostgreSQL version, execute the following command:
$ postgres --version
PostgreSQL configuration files
The PostgreSQL configuration settings file is located at /opt/bitnami/postgresql/data/postgresql.conf.
The PostgreSQL client authentication configuration file is located at /opt/bitnami/postgresql/data/pg_hba.conf.
The PostgreSQL official documentation has more details on how to configure the PostgreSQL database.
PostgreSQL socket
On Unix, PostgreSQL clients can connect to the server using an Unix socket file. Usually when you use a PostgreSQL client tool included in the Stack, you will not need to specify the socket for the connection.
The socket file is created at /opt/bitnami/postgresql/.s.PGSQL.5432.
PostgreSQL port
The default port in which PostgreSQL listens is 5432.
PostgreSQL log file
The main PostgreSQL log file is created at /opt/bitnami/postgresql/postgresql.log file. You can change the default error reporting and logging configuration settings in the postgresql.conf file.
NOTE: On some platforms, you may need root account privileges to view these files.