Thread: What's the logic of touching /var/log/pgsql ?

What's the logic of touching /var/log/pgsql ?

From
Craig Ringer
Date:
The PGDG spec files for PostgreSQL have the following lines in the
server preinst section:

%pre server
... creates Pg user ...
touch /var/log/pgsql
chown postgres:postgres /var/log/pgsql
chmod 0700 /var/log/pgsql


What's the logic there? Why create an empty /var/log/pgsql file owned by
user 'pgsql' ? It's not used for anything and just seems confusing.




--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Re: What's the logic of touching /var/log/pgsql ?

From
Devrim Gündüz
Date:
Hi,

On Fri, 2014-08-01 at 15:52 +0800, Craig Ringer wrote:
> The PGDG spec files for PostgreSQL have the following lines in the
> server preinst section:
>
> %pre server
> ... creates Pg user ...
> touch /var/log/pgsql
> chown postgres:postgres /var/log/pgsql
> chmod 0700 /var/log/pgsql
>
>
> What's the logic there? Why create an empty /var/log/pgsql file owned
> by user 'pgsql' ? It's not used for anything and just seems confusing.

It is obsoleted, can be removed.

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachment

Re: What's the logic of touching /var/log/pgsql ?

From
Strahinja Kustudić
Date:
Sorry for replying to an old topic, but it would be really good to remove this from new packages, since it's useless, and that file path could be a nice directory for storing postgres logs outside the data dir.

Do you guys accept patches for the RPM repository?


Strahinja Kustudić
| Lead System Engineer | Nordeus

On Fri, Aug 8, 2014 at 2:10 AM, Devrim Gündüz <devrim@gunduz.org> wrote:

Hi,

On Fri, 2014-08-01 at 15:52 +0800, Craig Ringer wrote:
> The PGDG spec files for PostgreSQL have the following lines in the
> server preinst section:
>
> %pre server
> ... creates Pg user ...
> touch /var/log/pgsql
> chown postgres:postgres /var/log/pgsql
> chmod 0700 /var/log/pgsql
>
>
> What's the logic there? Why create an empty /var/log/pgsql file owned
> by user 'pgsql' ? It's not used for anything and just seems confusing.

It is obsoleted, can be removed.

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Re: What's the logic of touching /var/log/pgsql ?

From
Strahinja Kustudić
Date:
Here is a patch which removes this from all currently maintained versions.


Strahinja Kustudić
| Lead System Engineer | Nordeus

On Wed, Feb 11, 2015 at 7:06 PM, Strahinja Kustudić <strahinjak@nordeus.com> wrote:
Sorry for replying to an old topic, but it would be really good to remove this from new packages, since it's useless, and that file path could be a nice directory for storing postgres logs outside the data dir.

Do you guys accept patches for the RPM repository?


Strahinja Kustudić
| Lead System Engineer | Nordeus

On Fri, Aug 8, 2014 at 2:10 AM, Devrim Gündüz <devrim@gunduz.org> wrote:

Hi,

On Fri, 2014-08-01 at 15:52 +0800, Craig Ringer wrote:
> The PGDG spec files for PostgreSQL have the following lines in the
> server preinst section:
>
> %pre server
> ... creates Pg user ...
> touch /var/log/pgsql
> chown postgres:postgres /var/log/pgsql
> chmod 0700 /var/log/pgsql
>
>
> What's the logic there? Why create an empty /var/log/pgsql file owned
> by user 'pgsql' ? It's not used for anything and just seems confusing.

It is obsoleted, can be removed.

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR



Attachment

Re: What's the logic of touching /var/log/pgsql ?

From
Devrim Gündüz
Date:
Hi,

On Wed, 2015-02-11 at 19:32 +0100, Strahinja Kustudić wrote:
> Here is a patch which removes this from all currently maintained
> versions.

Thanks for the patch! Can you please send another one that removes
related lines from Fedora 19+, too? I can only see RHEL ones in here.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachment

Re: What's the logic of touching /var/log/pgsql ?

From
Devrim Gündüz
Date:
Hi,

On Wed, 2015-02-11 at 19:06 +0100, Strahinja Kustudić wrote:
> Sorry for replying to an old topic, but it would be really good to
> remove this from new packages, since it's useless, and that file path
> could be a nice directory for storing postgres logs outside the data
> dir.

I can see that Craig removed this in 9.4 beta2, but it seems we did not
backpatch it. Sorry about that.

> Do you guys accept patches for the RPM repository?

Sure!

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachment

Re: What's the logic of touching /var/log/pgsql ?

From
Strahinja Kustudić
Date:
Sure, I'll make an additional patch for fedora.


Strahinja Kustudić
| Lead System Engineer | Nordeus

On Wed, Feb 11, 2015 at 8:01 PM, Devrim Gündüz <devrim@gunduz.org> wrote:
Hi,

On Wed, 2015-02-11 at 19:06 +0100, Strahinja Kustudić wrote:
> Sorry for replying to an old topic, but it would be really good to
> remove this from new packages, since it's useless, and that file path
> could be a nice directory for storing postgres logs outside the data
> dir.

I can see that Craig removed this in 9.4 beta2, but it seems we did not
backpatch it. Sorry about that.

> Do you guys accept patches for the RPM repository?

Sure!

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Re: What's the logic of touching /var/log/pgsql ?

From
Strahinja Kustudić
Date:
Here is the patch for Fedora.


Strahinja Kustudić
| Lead System Engineer | Nordeus

On Thu, Feb 12, 2015 at 7:02 PM, Strahinja Kustudić <strahinjak@nordeus.com> wrote:
Sure, I'll make an additional patch for fedora.


Strahinja Kustudić
| Lead System Engineer | Nordeus

On Wed, Feb 11, 2015 at 8:01 PM, Devrim Gündüz <devrim@gunduz.org> wrote:
Hi,

On Wed, 2015-02-11 at 19:06 +0100, Strahinja Kustudić wrote:
> Sorry for replying to an old topic, but it would be really good to
> remove this from new packages, since it's useless, and that file path
> could be a nice directory for storing postgres logs outside the data
> dir.

I can see that Craig removed this in 9.4 beta2, but it seems we did not
backpatch it. Sorry about that.

> Do you guys accept patches for the RPM repository?

Sure!

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR



Attachment

Re: What's the logic of touching /var/log/pgsql ?

From
Devrim Gündüz
Date:
Hi,

On Thu, 2015-02-12 at 19:16 +0100, Strahinja Kustudić wrote:
> Here is the patch for Fedora.

Thanks! Pushed.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachment