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 1614737 - postgresql-setup creates incorrect log directory
Summary: postgresql-setup creates incorrect log directory
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql
Version: 28
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Patrik Novotný
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1585513
Blocks: 1614738 1614763
TreeView+ depends on / blocked
 
Reported: 2018-08-10 10:14 UTC by Pavel Raiskup
Modified: 2019-05-03 05:49 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1585513
: 1614738 1614763 (view as bug list)
Environment:
Last Closed: 2019-05-03 05:49:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Raiskup 2018-08-10 10:14:48 UTC
+++ This bug was initially created as a clone of Bug #1585513 +++

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.

--- Additional comment from Pavel Raiskup on 2018-08-10 12:04:44 CEST ---

Hi Michael, thanks for the report.  Selinux context type should be
postgresql_log_t, but is postgresql_db_t.

--- Additional comment from Pavel Raiskup on 2018-08-10 12:09:08 CEST ---

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 1 Pavel Raiskup 2018-08-10 11:11:24 UTC
Upstream fix in postgresql-setup:
https://github.com/devexp-db/postgresql-setup/commit/c9f3bd36108d0719bbbdef0613ad9c0aa33cffac

Comment 2 Pavel Raiskup 2019-01-21 13:17:52 UTC
Fixed in selinux policy upstream:
https://github.com/fedora-selinux/selinux-policy/commit/8555de535032724934dbb7fb0d592c4345fa4c28

Comment 3 Ben Cotton 2019-05-02 19:47:30 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Pavel Raiskup 2019-05-03 05:49:48 UTC
Fixed in F29+ (postgresql-setup 8.3+).


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