invalid target_session_attrs value=standby

14 views
Skip to first unread message

Geraldine Oo

unread,
Jul 23, 2026, 11:23:48 PM (5 days ago) Jul 23
to Barman, Backup and Recovery Manager for PostgreSQL
Hello All,

I'm using barman 3.19 and I'm trying to run the backup off our standby DB instead of primary. Barman check fails - and i'm getting this in the log.

2026-07-24 03:18:02,724 [3219313] barman.backup_executor WARNING: Could not validate compression due to a problem with the PostgreSQL connection: invalid target_session_attrs value: "standby"

seems its using an older libpq? I've set the LD_LIBRARY_PATH for barman user, but still it's not using the newer version that we have installed on the server. 

Thanks


kaido vaikla

unread,
Jul 24, 2026, 5:13:07 AM (4 days ago) Jul 24
to pgba...@googlegroups.com
Hi, 

Check your 

; PATH setting for this server
path_prefix =

in .conf file 

br
Kaido

Geraldine Oo

unread,
Jul 26, 2026, 8:55:37 PM (2 days ago) Jul 26
to Barman, Backup and Recovery Manager for PostgreSQL

The path_prefix is set to my PG17 bin directory.
I also set the LD_LIBRARY_PATH for barman to the PG17 lib directory. 

Geraldine Oo

unread,
Jul 26, 2026, 9:00:46 PM (2 days ago) Jul 26
to Barman, Backup and Recovery Manager for PostgreSQL
If i test the connections on command line - they work fine.
but when barman runs (e.g. barman check ) it will throw that error in the logs

on command line- .. works 
$ psql "host=pg17-db01.ocp-prod-1.ch-dc.lan,pg17-db02.ocp-prod-1.ch-dc.lan,pg17-db04.ocp-prod-1.ch-drp.lan port=5430 user=streaming_barman dbname=postgres target_session_attrs=standby"

When barman runs - it will fail
2026-07-27 00:59:02,757 [296769] barman.backup_executor WARNING: Could not validate compression due to a problem with the PostgreSQL connection: invalid target_session_attrs value: "standby"

Martin Marques

unread,
2:27 AM (13 hours ago) 2:27 AM
to Barman, Backup and Recovery Manager for PostgreSQL
It's hard to say where the problem is. Can you share a larger excerpt of the log output and the configuration of the server (`barman show-server` or `barman diagnose` or the configuration file for this server)
Reply all
Reply to author
Forward
0 new messages