pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: postgres_fdw: Extend postgres_fdw_get_connections to return user 2+ messages / 1 participants [nested] [flat]
* pgsql: postgres_fdw: Extend postgres_fdw_get_connections to return user @ 2024-09-18 03:52 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2024-09-18 03:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Extend postgres_fdw_get_connections to return user name. This commit adds a "user_name" output column to the postgres_fdw_get_connections function, returning the name of the local user mapped to the foreign server for each connection. If a public mapping is used, it returns "public." This helps identify postgres_fdw connections more easily, such as determining which connections are invalid, closed, or used within the current transaction. No extension version bump is needed, as commit c297a47c5f already handled it for v18~. Author: Hayato Kuroda Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/b492a935-6c7e-8c08-e485-3c1d64d7d10f@oss.nttdata.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4f08ab55457751308ffd8d33e82155758cd0e304 Modified Files -------------- contrib/postgres_fdw/connection.c | 57 ++++++++++++++++++++----- contrib/postgres_fdw/expected/postgres_fdw.out | 16 ++++--- contrib/postgres_fdw/postgres_fdw--1.1--1.2.sql | 3 +- contrib/postgres_fdw/sql/postgres_fdw.sql | 8 ++-- doc/src/sgml/postgres-fdw.sgml | 23 +++++++--- 5 files changed, 81 insertions(+), 26 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: postgres_fdw: Extend postgres_fdw_get_connections to return remo @ 2025-03-03 00:16 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2025-03-03 00:16 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org postgres_fdw: Extend postgres_fdw_get_connections to return remote backend PID. This commit adds a new "remote_backend_pid" output column to the postgres_fdw_get_connections function. It returns the process ID of the remote backend, on the foreign server, handling the connection. This enhancement is useful for troubleshooting, monitoring, and reporting. For example, if a connection is unexpectedly closed by the foreign server, the remote backend's PID can help diagnose the cause. No extension version bump is needed, as commit c297a47c5f already handled it for v18~. Author: Sagar Dilip Shedge <sagar.shedge92@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CAPhYifF25q5xUQWXETfKwhc0YVa_6+tfG9Kw4bCvCjpCWxYs2A@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/fe186bda78c4a0ccbb691489c744e6317f648434 Modified Files -------------- contrib/postgres_fdw/connection.c | 11 ++++-- contrib/postgres_fdw/expected/postgres_fdw.out | 46 ++++++++++++++++--------- contrib/postgres_fdw/postgres_fdw--1.1--1.2.sql | 2 +- contrib/postgres_fdw/sql/postgres_fdw.sql | 26 ++++++++++---- doc/src/sgml/postgres-fdw.sgml | 23 +++++++++---- 5 files changed, 76 insertions(+), 32 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-03-03 00:16 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-09-18 03:52 pgsql: postgres_fdw: Extend postgres_fdw_get_connections to return user Fujii Masao <fujii@postgresql.org> 2025-03-03 00:16 pgsql: postgres_fdw: Extend postgres_fdw_get_connections to return remo Fujii Masao <fujii@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox