Re: [HACKERS] Patching dblink.c to avoid warning about open transaction
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] Patching dblink.c to avoid warning about open transaction |
Дата | |
Msg-id | 4889.1128700048@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Patching dblink.c to avoid warning about open (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] Patching dblink.c to avoid warning about open
|
Список | pgsql-patches |
Bruce Momjian <pgman@candle.pha.pa.us> writes: > Well, as I said in the patch email: > The reported problem is that dblink_open/dblink_close() (for cursor > reads) do a BEGIN/COMMIT regardless of the transaction state of the > remote connection. There was code in dblink.c to track the remote > transaction state (rconn), but it was not being maintained or used. You should lose the remoteXactOpen flag entirely, in favor of just testing PQtransactionStatus() on-the-fly when necessary. Simpler, more reliable, not notably slower. With that change, the separate remoteConn struct could be dropped altogether in favor of just using the PGconn pointer. This would make things notationally simpler, and in fact perhaps allow undoing the bulk of the edits in your patch. As-is I think the patch is pretty risky to apply during beta. regards, tom lane
В списке pgsql-patches по дате отправления: