Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1585513 - postgresql-setup creates incorrect log directory
Summary: postgresql-setup creates incorrect log directory
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: postgresql
Version: rh-postgresql10
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
: 3.7
Assignee: Patrik Novotný
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On: 1667930
Blocks: 1614737 1614738 1614763
TreeView+ depends on / blocked
 
Reported: 2018-06-03 22:55 UTC by Michael Chapman
Modified: 2021-02-15 07:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1614737 (view as bug list)
Environment:
Last Closed: 2021-02-15 07:39:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michael Chapman 2018-06-03 22:55:11 UTC
This bug is reported against rh-postgresql10-postgresql-server-10.3-2.el7.x86_64.

As of PostgreSQL 10, the default log directory is $PGDATA/log (see https://www.postgresql.org/docs/10/static/release-10.html), however postgresql-setup still creates a $PGDATA/pg_log directory.

This is a relatively minor problem, as the postmaster will create the correct log directory as required, but it may mislead the administrator. I also haven't checked whether the automatically-created log directory ends up with the correct SELinux context.

Comment 2 Pavel Raiskup 2018-08-10 10:04:44 UTC
Hi Michael, thanks for the report.  Selinux context type should be
postgresql_log_t, but is postgresql_db_t.

Comment 3 Pavel Raiskup 2018-08-10 10:09:08 UTC
OTOH, this IMO requires also SELinux policy change.  Because running
restorecon manually only changes contexts for files under `log` directory,
not for the `log` directory itself.  That in turn means that fixing
postgresql-setup script would have no effect.

Comment 10 RHEL Program Management 2021-02-15 07:39:16 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


Note You need to log in before you can comment on or make changes to this bug.