Bug 853353 - unix_socket_directory configuration parameter is not recognized
Summary: unix_socket_directory configuration parameter is not recognized
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-31 08:19 UTC by Joonas Sarajärvi
Modified: 2017-08-11 14:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-31 17:01:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test case script (939 bytes, text/plain)
2012-08-31 08:24 UTC, Joonas Sarajärvi
no flags Details
Updated test case script (584 bytes, text/plain)
2012-08-31 08:32 UTC, Joonas Sarajärvi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1480624 0 unspecified CLOSED pg_upgrade from rh-postgresql95 fails against el7 postgresql (9.2) 2021-02-22 00:41:40 UTC

Internal Links: 1480624

Description Joonas Sarajärvi 2012-08-31 08:19:17 UTC
Description of problem:
A configuration parameter that works in postgresql

Version-Release number of selected component (if applicable):
postgresql-9.1.5-1.fc17.x86_64 (does not work)
postgresql-9.1.3-3.fc17.x86_64 (works)

How reproducible:
Reliably

Steps to Reproduce:
1. Download the attached test script into breakpg.sh
2. Run ./breakpg.sh

Actual results:

Test script ends by printing "nay"
Start-up of database fails. breakdb/log file has the following error message:
FATAL:  unrecognized configuration parameter "unix_socket_directory"
Running pg_ctl status -D breakdb/data prints:
pg_ctl: no server running

Expected results:

Test script ends by outputting "ok"
Running pg_ctl status -D breakdb/data prints something like:
pg_ctl: server is running (PID: 17527)

Comment 1 Joonas Sarajärvi 2012-08-31 08:24:08 UTC
Created attachment 608422 [details]
Test case script

Comment 2 Joonas Sarajärvi 2012-08-31 08:32:30 UTC
Created attachment 608426 [details]
Updated test case script

The previous test case script contais a function that is not actually needed,
as a leftover from modifying another script into a test case script.

This new version is a bit simpler.

Comment 3 Tom Lane 2012-08-31 14:03:50 UTC
Not a bug.  It's called unix_socket_directories now (and you can have more than one in the list).  In any case, fooling with that value has never really been considered supported in Fedora/RHEL --- are you sure you need to change it?

Comment 4 Joonas Sarajärvi 2012-08-31 17:01:58 UTC
Thank you for the quick response.

I think it is a bit surprising for a configuration file syntax to change
like this in what looks like a maintenance update to a stable Fedora release.

Documentation in [1] also does not warn about the lack of support for the
option. Worse, it also lists just the old syntax which is not accepted by
the 9.1.5 version the document is titled to describe.

However, maybe upstream would be a more appropriate place to whine about
this. Thanks for pointing me to the right direction.

The reason for overriding the socket directory is that I am setting up
a throwaway postgresql instance against which to run some automated tests
of a piece of software. This way a local developer can safely hack at stuff
and run the tests at without having to be afraid of breaking a system-wide
database.

References:
[1] http://www.postgresql.org/docs/9.1/static/runtime-config-connection.html

Comment 5 Tom Lane 2012-08-31 18:24:21 UTC
Well, upstream didn't change it --- rather, we chose to back-port a later upstream feature into the Fedora package in order to deal with bug #825448.  The Fedora documentation for postgresql describes the new configuration variable, but of course the upstream 9.1 documentation would not.

Comment 6 Tom Lane 2012-08-31 18:29:01 UTC
BTW, forgot to mention this, but: usually the preferred way to set up an alternate postmaster is with a non-default port number (and don't forget the non-default data directory, of course).  There's no need to use a different socket directory if you do it that way.  It's usually relatively easy to get client code to use a different port number, but changing its idea of the socket directory can be hard to impossible.  And of course, if you're using TCP-connection clients, changing the socket directory is irrelevant anyway.  These considerations are why we felt we could get away with changing the Fedora package's socket-directory behavior in a minor release.

Comment 7 Joonas Sarajärvi 2012-08-31 19:14:12 UTC
Thank you for the explanation.

While it is easy to use the PGHOST environment variable to direct at least some postgresql clients (including the ones I work with) to a custom socket directory, I will consider using just a custom port number.

However, in my current opinion, it does not look nearly as clean as having the developers run tests against a database instance that is entirely contained within the account of the developer, similarly to all the other machinery that is used for running the tests.


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