Обсуждение: pgagent errors on application_name

Поиск
Список
Период
Сортировка

pgagent errors on application_name

От
Josh Berkus
Дата:
To wit:

postgres@9c7b33848038:~$ pgagent -l pgagent.log -f dbname=postgres
user=postgres application_name=pgagent
ERROR: Primary connection string is not valid!
18:15:15: Debug: In file ../src/unix/threadpsx.cpp at line 261:
'pthread_mutex_destroy()' failed with error 0x00000010 (Device or
resource busy).

I'm unclear on why this would be failing, though; AFAICT, connection.h
doesn't do anything but wrap the basic libpq connection class.  Ideas?

BTW, when we fix this, I'd like to set a default application_name of
"pgagent" if the user does not supply one.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



Re: pgagent errors on application_name

От
Ashesh Vashi
Дата:
Hi Josh,

On Mon, Jul 6, 2015 at 11:55 PM, Josh Berkus <josh@agliodbs.com> wrote:
To wit:

postgres@9c7b33848038:~$ pgagent -l pgagent.log -f dbname=postgres
user=postgres application_name=pgagent
ERROR: Primary connection string is not valid!
18:15:15: Debug: In file ../src/unix/threadpsx.cpp at line 261:
'pthread_mutex_destroy()' failed with error 0x00000010 (Device or
resource busy).
Can you please check, which libpq it is using? (You may use ldd for checking that.)
The error suggests that It might be using very old version of libpq.

You may want to use PGAPPNAME in that case.

--
Thanks & Regards,

Ashesh Vashi

I'm unclear on why this would be failing, though; AFAICT, connection.h
doesn't do anything but wrap the basic libpq connection class.  Ideas?

BTW, when we fix this, I'd like to set a default application_name of
"pgagent" if the user does not supply one.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

Re: pgagent errors on application_name

От
Josh Berkus
Дата:
On 07/06/2015 08:52 PM, Ashesh Vashi wrote:
> Hi Josh,
> 
> On Mon, Jul 6, 2015 at 11:55 PM, Josh Berkus <josh@agliodbs.com
> <mailto:josh@agliodbs.com>> wrote:
> 
>     To wit:
> 
>     postgres@9c7b33848038:~$ pgagent -l pgagent.log -f dbname=postgres
>     user=postgres application_name=pgagent
>     ERROR: Primary connection string is not valid!
>     18:15:15: Debug: In file ../src/unix/threadpsx.cpp at line 261:
>     'pthread_mutex_destroy()' failed with error 0x00000010 (Device or
>     resource busy).
> 
> Can you please check, which libpq it is using? (You may use /ldd/ for
> checking that.)
> The error suggests that It might be using very old version of libpq.

Nope, that's not the issue:
libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x00007fa7f377b000)

Note that the error message doesn't match the standard libpq error in
any case.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



Re: pgagent errors on application_name

От
Ashesh Vashi
Дата:
On Wed, Jul 8, 2015 at 7:06 AM, Josh Berkus <josh@agliodbs.com> wrote:
On 07/06/2015 08:52 PM, Ashesh Vashi wrote:
> Hi Josh,
>
> On Mon, Jul 6, 2015 at 11:55 PM, Josh Berkus <josh@agliodbs.com
> <mailto:josh@agliodbs.com>> wrote:
>
>     To wit:
>
>     postgres@9c7b33848038:~$ pgagent -l pgagent.log -f dbname=postgres
>     user=postgres application_name=pgagent
>     ERROR: Primary connection string is not valid!
>     18:15:15: Debug: In file ../src/unix/threadpsx.cpp at line 261:
>     'pthread_mutex_destroy()' failed with error 0x00000010 (Device or
>     resource busy).
>
> Can you please check, which libpq it is using? (You may use /ldd/ for
> checking that.)
> The error suggests that It might be using very old version of libpq.

Nope, that's not the issue:

        libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x00007fa7f377b000)

Note that the error message doesn't match the standard libpq error in
any case.
Yes - I missed that.
application_name in connection string is supported by pgAgent.

Patch is welcome.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi


--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com