Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No application_name in pgagroal-cli details with pipeline=transaction? #128

Closed
dtseiler opened this issue Jan 14, 2021 · 3 comments
Closed
Assignees
Labels
enhancement Improvement to an existing feature

Comments

@dtseiler
Copy link

Describe the bug

In Issue #81, the application_name was supposed to be added to the details. However in running pgagroal-cli details on pgagroal 1.1.0, I don't see the application_name output.

I did notice that when I changed pipeline from transaction to session, that it does show the application_name in details. I also noticed however that the application_name is never updated in the connection. If I disconnect and connect with a different application name using the same pooled session as before, the application name doesn't change.

To Reproduce

From client machine:

$ psql -h 192.168.12.102 -p 2345 -U dts -d dts_test --variable=application_name=foo
psql (12.5 (Ubuntu 12.5-1.pgdg18.04+1))
Type "help" for help.

dts_test=> show application_name;
 application_name
------------------
 foo
(1 row)

On pgagroal 1.1.0 machine:

$ sudo -u pgagroal pgagroal-cli -c /usr/local/etc/pgagroal/pgagroal.conf -v details | grep dts
Connection    0:     Free            2021-01-14 21:30:43        dts_test dts

Version

1.1.0

PostgreSQL

12

libev

  • libev-dev/bionic,now 1:4.22-1 amd64 [installed]
  • libev4/bionic,now 1:4.22-1 amd64 [installed,automatic]

OpenSSL

  • openssl/bionic-updates,bionic-security,now 1.1.1-1ubuntu2.1~18.04.7 amd64 [installed]
  • libssl-dev/bionic-updates,bionic-security,now 1.1.1-1ubuntu2.1~18.04.7 amd64 [installed]

Access method

md5

OS

Ubuntu Linux 18.04

ulimit

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 3693
max locked memory       (kbytes, -l) 65536
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 3693
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Configuration

Can you provide the configuration pgagroal ?

  • pgagroal.conf

  • pgagroal_hba.conf

  • pgagroal_databases.conf

  • pgagroal_users.conf

Debug logs

Can you provide any debug logs (log_level = debug5) of the issue ?

Tip

Use ``` before and after the text to keep the output as is.

@dtseiler dtseiler added the bug Something isn't working label Jan 14, 2021
@dtseiler
Copy link
Author

Even with pipeline=session, after a few minutes the details stops showing the application_name again. Very bizarre.

We currently use pool_mode=transaction with pgbouncer, so my understanding that would translate to pipeline=transaction in pgagroal.

@jesperpedersen
Copy link
Collaborator

application_name is sent upon startup, so it will disappear once the connection changes. Maybe we should record it locally with transaction...

I don't know the session issue yet - if you have more steps for me to try let me know.

@jesperpedersen jesperpedersen self-assigned this Jan 25, 2021
@jesperpedersen jesperpedersen added enhancement Improvement to an existing feature and removed bug Something isn't working labels Jan 26, 2021
@jesperpedersen
Copy link
Collaborator

Lets go the easy route for now and keep application_name locally.

Open a new issue if you figure out what the session issue is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants