pg.ddx.io pgsql-pkg-debian@postgresql.org mailing list archive
help / color / mirror / Atom feedIssue with clusters with '-' in the name
5+ messages / 2 participants
[nested] [flat]
* Issue with clusters with '-' in the name
@ 2016-04-19 18:27 David Peall <david@dnservices.co.za>
2016-04-19 18:53 ` Re: Issue with clusters with '-' in the name Christoph Berg <myon@debian.org>
0 siblings, 1 reply; 5+ messages in thread
From: David Peall @ 2016-04-19 18:27 UTC (permalink / raw)
To: apt.postgresql.org repository <myon@debian.org>
Hi
pc_ctlcluseter doesn’t work with cluster names containing ‘-‘ the latest version of postgres from
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
Steps to reproduce the error:
pg_createcluster 9.5 test-dash
pg_ctlcluster 9.5 test-dash start - doesn’t work
This works fine:
pg_createcluster 9.5 withoutdash
pg_ctlcluster 9.5 withoutdash start
OS’s tested Ubuntu 15.10 and 16.04 beta both exhibit this issue.
Regards
—
David Peall
--
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Issue with clusters with '-' in the name
2016-04-19 18:27 Issue with clusters with '-' in the name David Peall <david@dnservices.co.za>
@ 2016-04-19 18:53 ` Christoph Berg <myon@debian.org>
2016-04-19 20:06 ` Re: Issue with clusters with '-' in the name Christoph Berg <myon@debian.org>
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Berg @ 2016-04-19 18:53 UTC (permalink / raw)
To: David Peall <david@dnservices.co.za>
Re: David Peall 2016-04-19 <E7F3EFD1-82A2-47BB-833D-EFA6BBD66969@dnservices.co.za>
> Hi
>
> pc_ctlcluseter doesn’t work with cluster names containing ‘-‘ the latest version of postgres from
> deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
>
> Steps to reproduce the error:
> pg_createcluster 9.5 test-dash
> pg_ctlcluster 9.5 test-dash start - doesn’t work
Hi,
that's a known issue with the systemd integration:
$ head -4 /lib/systemd/system/postgresql\@.service
# systemd service template for PostgreSQL clusters. The actual instances will
# be called "postgresql@version-cluster", e.g. "postgresql@9.3-main". The
# variable %i expands to "version-cluster", %I expands to "version/cluster".
# (%I breaks for cluster names containing dashes.)
Since postgresql-common 171 (18 Dec 2015) you should get a warning when
creating clusters with dashes in the name.
Could you verify which postgresql-common version you have there?
Christoph
--
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Issue with clusters with '-' in the name
2016-04-19 18:27 Issue with clusters with '-' in the name David Peall <david@dnservices.co.za>
2016-04-19 18:53 ` Re: Issue with clusters with '-' in the name Christoph Berg <myon@debian.org>
@ 2016-04-19 20:06 ` Christoph Berg <myon@debian.org>
2016-04-19 20:18 ` Re: Issue with clusters with '-' in the name David Peall <david@dnservices.co.za>
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Berg @ 2016-04-19 20:06 UTC (permalink / raw)
To: David Peall <david@dnservices.co.za>; +Cc: pgsql-pkg-debian
Re: David Peall 2016-04-19 <57359EF6-B59F-4300-85A8-EEB4CF73489A@dnservices.co.za>
> > $ head -4 /lib/systemd/system/postgresql\@.service
> > # systemd service template for PostgreSQL clusters. The actual instances will
> > # be called "postgresql@version-cluster", e.g. "postgresql@9.3-main". The
> > # variable %i expands to "version-cluster", %I expands to "version/cluster".
> > # (%I breaks for cluster names containing dashes.)
> >
> > Since postgresql-common 171 (18 Dec 2015) you should get a warning when
> > creating clusters with dashes in the name.
>
> I do get the following warning:
> Warning: cluster names containing dashes (-) will cause problems when running from systemd. Continuing anyway
Thanks.
As said in the comment in postgresql@.service, there's unfortunately
not too much we can do about it. The problem is in this line:
ConditionPathExists=/etc/postgresql/%I/postgresql.conf
If you need clusters with dashes in the name, remove this line from
the .service file. (The downside is that you can then start services
called postgresql@what-ever and end up with "failed" bogus services.)
Christoph
--
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Issue with clusters with '-' in the name
2016-04-19 18:27 Issue with clusters with '-' in the name David Peall <david@dnservices.co.za>
2016-04-19 18:53 ` Re: Issue with clusters with '-' in the name Christoph Berg <myon@debian.org>
2016-04-19 20:06 ` Re: Issue with clusters with '-' in the name Christoph Berg <myon@debian.org>
@ 2016-04-19 20:18 ` David Peall <david@dnservices.co.za>
2016-04-19 20:25 ` Re: Issue with clusters with '-' in the name Christoph Berg <myon@debian.org>
0 siblings, 1 reply; 5+ messages in thread
From: David Peall @ 2016-04-19 20:18 UTC (permalink / raw)
To: Christoph Berg <myon@debian.org>; +Cc: pgsql-pkg-debian
> On 19 Apr 2016, at 4:06 PM, Christoph Berg <myon@debian.org> wrote:
>
> Re: David Peall 2016-04-19 <57359EF6-B59F-4300-85A8-EEB4CF73489A@dnservices.co.za>
>>> $ head -4 /lib/systemd/system/postgresql\@.service
>>> # systemd service template for PostgreSQL clusters. The actual instances will
>>> # be called "postgresql@version-cluster", e.g. "postgresql@9.3-main". The
>>> # variable %i expands to "version-cluster", %I expands to "version/cluster".
>>> # (%I breaks for cluster names containing dashes.)
>>>
>>> Since postgresql-common 171 (18 Dec 2015) you should get a warning when
>>> creating clusters with dashes in the name.
>>
>> I do get the following warning:
>> Warning: cluster names containing dashes (-) will cause problems when running from systemd. Continuing anyway
>
> Thanks.
>
> As said in the comment in postgresql@.service, there's unfortunately
> not too much we can do about it. The problem is in this line:
>
> ConditionPathExists=/etc/postgresql/%I/postgresql.conf
>
> If you need clusters with dashes in the name, remove this line from
> the .service file. (The downside is that you can then start services
> called postgresql@what-ever and end up with "failed" bogus services.)
>
> Christoph
Where is the expansion done into %i and %I ? I notice that the following works:
systemctl start postgresql@9.5/main
Regards
—
David Peall
--
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Issue with clusters with '-' in the name
2016-04-19 18:27 Issue with clusters with '-' in the name David Peall <david@dnservices.co.za>
2016-04-19 18:53 ` Re: Issue with clusters with '-' in the name Christoph Berg <myon@debian.org>
2016-04-19 20:06 ` Re: Issue with clusters with '-' in the name Christoph Berg <myon@debian.org>
2016-04-19 20:18 ` Re: Issue with clusters with '-' in the name David Peall <david@dnservices.co.za>
@ 2016-04-19 20:25 ` Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Berg @ 2016-04-19 20:25 UTC (permalink / raw)
To: David Peall <david@dnservices.co.za>; +Cc: pgsql-pkg-debian
Re: David Peall 2016-04-19 <EA86466E-8639-4981-BA83-9516E6D0AE3D@dnservices.co.za>
> Where is the expansion done into %i and %I ? I notice that the following works:
> systemctl start postgresql@9.5/main
In that context, both are actually the same:
# systemctl status postgresql@9.5/main| cat
● postgresql@9.5-main.service - PostgreSQL Cluster 9.5-main
In the config, %i expands to thing-with-all-slashes-converted-to-dashes
and %I expands to thing-with-all-dashes-converted-to-slashes (where
"thing" is the part after @). It's a bit weird..
Christoph
--
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2016-04-19 20:25 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-19 18:27 Issue with clusters with '-' in the name David Peall <david@dnservices.co.za>
2016-04-19 18:53 ` Christoph Berg <myon@debian.org>
2016-04-19 20:06 ` Christoph Berg <myon@debian.org>
2016-04-19 20:18 ` David Peall <david@dnservices.co.za>
2016-04-19 20:25 ` Christoph Berg <myon@debian.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox