On Sun, Apr 6, 2025 at 8:50 PM Greg Sabino Mullane <htamf...@gmail.com> wrote: > I lean for #1. Yes, there is some inconsistency, but it feels like the right > thing to do, and this is a feature I suspect not many people will use anyway.
I just saw the commit message here and thought I would show up to say that it sounds like a cool feature. I agree that not many people will use it, but when you need it, you're probably going to be really happy to have it. The only thing that makes me a little bit sad is that we don't seem to have added this to pg_stat_activity. I feel like that would be the dream here: in the rare situation where you're not sure which interface is connecting to a client, having this in pg_stat_activity would allow you to clarify the situation without needing to change your logging. Maybe it's not super-important; in a pinch, at least on Linux, you can probably use netstat to figure out what's happening. However, putting it in pg_stat_activity would, at least for me, would make the information routinely available without extra steps. If you have to ask a user to run an extra tool, they have to have it installed and know how to use it and run it at the same time they collect the pg_stat_activity data and so on; if you just add a column to pg_stat_activity then the information just shows up as part of routine data gathering. -- Robert Haas EDB: http://www.enterprisedb.com