Show Table of Contents
Chapter 10. PostgreSQL
PostgreSQL is an Object-Relational database management system (DBMS).[8]
In Red Hat Enterprise Linux 6, the postgresql-server package provides PostgreSQL. Run the
rpm -q postgresql-server command to see if the postgresql-server package is installed. If it is not installed, run the following command as the root user to install it:
~]# yum install postgresql-server10.1. PostgreSQL and SELinux
When PostgreSQL is enabled, it runs confined by default. Confined processes run in their own domains, and are separated from other confined processes. If a confined process is compromised by an attacker, depending on SELinux policy configuration, an attacker's access to resources and the possible damage they can do is limited. The following example demonstrates the PostgreSQL processes running in their own domain. This example assumes the postgresql-server package is installed:
- Run the
getenforcecommand to confirm SELinux is running in enforcing mode:~]$
getenforceEnforcingThegetenforcecommand returnsEnforcingwhen SELinux is running in enforcing mode. - Run the
service postgresql startcommand as the root user to startpostgresql:~]#
service postgresql startStarting postgresql service: [ OK ] - Run the
ps -eZ | grep postgrescommand to view thepostgresqlprocesses:~]$
ps -eZ | grep postgresunconfined_u:system_r:postgresql_t:s0 395 ? 00:00:00 postmaster unconfined_u:system_r:postgresql_t:s0 397 ? 00:00:00 postmaster unconfined_u:system_r:postgresql_t:s0 399 ? 00:00:00 postmaster unconfined_u:system_r:postgresql_t:s0 400 ? 00:00:00 postmaster unconfined_u:system_r:postgresql_t:s0 401 ? 00:00:00 postmaster unconfined_u:system_r:postgresql_t:s0 402 ? 00:00:00 postmasterThe SELinux context associated with thepostgresqlprocesses isunconfined_u:system_r:postgresql_t:s0. The second last part of the context,postgresql_t, is the type. A type defines a domain for processes and a type for files. In this case, thepostgresqlprocesses are running in thepostgresql_tdomain.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.