diff options
| author | Fujii Masao | 2024-07-26 13:15:51 +0000 |
|---|---|---|
| committer | Fujii Masao | 2024-07-26 13:15:51 +0000 |
| commit | c297a47c5f8da78d976e8c3f790dbeeb6a21a853 (patch) | |
| tree | 46df1a1f4a115f6dd82ff15e21e096489695b09f /contrib/postgres_fdw/expected | |
| parent | 5687f8c0dd766acb15587a0af8b5208aa3841b21 (diff) | |
postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections().
This commit extends the postgres_fdw_get_connections() function to
include a new used_in_xact column, indicating whether each connection
is used in the current transaction.
This addition is particularly useful for the upcoming feature that
will check if connections are closed. By using those information,
users can verify if postgres_fdw connections used in a transaction
remain open. If any connection is closed, the transaction cannot
be committed successfully. In this case users can roll back it
immediately without waiting for transaction end.
The SQL API for postgres_fdw_get_connections() is updated by
this commit and may change in the future. To handle compatibility
with older SQL declarations, an API versioning system is introduced,
allowing the function to behave differently based on the API version.
Author: Hayato Kuroda
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib/postgres_fdw/expected')
| -rw-r--r-- | contrib/postgres_fdw/expected/postgres_fdw.out | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index 39b2b317e87..82fdc0e26fc 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -10464,10 +10464,10 @@ drop cascades to foreign table ft7 -- should be output as invalid connections. Also the server name for -- loopback3 should be NULL because the server was dropped. SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; - server_name | valid --------------+------- - loopback | f - | f + server_name | valid | used_in_xact +-------------+-------+-------------- + loopback | f | t + | f | t (2 rows) -- The invalid connections get closed in pgfdw_xact_callback during commit. |
