pcp
[Top] [All Lists]

Re: [pcp] PostgreSQL PMDA --> EnterpriseDB

To: pcp@xxxxxxxxxxx
Subject: Re: [pcp] PostgreSQL PMDA --> EnterpriseDB
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 07 Jul 2015 07:37:58 +1000
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <CADDXySqgr+X192n92WbxOpMywGBZ=+p1thzYiefkT4+1_J_1TA@xxxxxxxxxxxxxx>
References: <CADDXySqgr+X192n92WbxOpMywGBZ=+p1thzYiefkT4+1_J_1TA@xxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
Welcome Pieter.

On 06/07/15 20:07, Pieter Baele wrote:
...
However, the user, the configuration etc are different.
I tried overriding the settings using /etc/pcpdbi.conf but apparently I
am doing something wrong...

Not necessarily.

[Mon Jul 6 12:04:09] pmdapostgresql(15075) Critical: cannot find the
postgres user to switch to '

Anyone with an example?

(the user is 'enterprisedb', dbname is still postgres I think)

This message comes from the pmda->set_user() call near the end of the Perl code. For reasons that escape me (I did not write this code) this is trying to set the O/S (Linux probably) user to "postgres" so the PMDA does not run with UID 0 (root). It is unfortunate and confusing that this is the same string as the default DB username.

Unless there are some O/S level protections needed to connect to PostgreSQL (seems unlikely) you could replace 'postgres' here with any valid Linux user name, else you might consider the attached modified version of the PMDA that uses $os_user instead of 'postgres' which would allow you to change it via

$os_user = 'something else';

in one of the *.conf files mentioned in the man page. This version also includes some additional logging ahead of the set_user() call and the attempted DB connection.

I'll commit these changes once I receive some confirmation that this has improved the situation.

[the mailer at oss.sgi.com did not like a perl attachment, so I've replaced it by a patch file]

Attachment: pcp.patch
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>