pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: setLastTid() and currtid()
3+ messages / 2 participants
[nested] [flat]
* Re: setLastTid() and currtid()
@ 2020-02-07 08:24 Fujii Masao <masao.fujii@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Fujii Masao @ 2020-02-07 08:24 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Andres Freund <andres@anarazel.de>; Inoue, Hiroshi <h-inoue@dream.email.ne.jp>; PostgreSQL-development <pgsql-hackers@postgresql.org>; Heikki Linnakangas <hlinnaka@iki.fi>; Michael Paquier <michael.paquier@gmail.com>; Hiroshi Inoue <inoue@tpf.co.jp>; pgsql-odbc
On Fri, Apr 12, 2019 at 1:44 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Thu, Apr 11, 2019 at 02:06:13PM -0400, Tom Lane wrote:
> > Yeah, if we could simplify the tableam API, that would be sufficient
> > reason to remove the stuff in v12, IMO. But if it is outside of that
> > API, I'd counsel waiting till v13.
>
> Yes, I agree that simplifying the table AM interface would be a reason
> fine enough to delete this code for v12. If not, v13 sounds better at
> this stage.
Now we are in the dev of v13, so it's time to rip the functions out?
Regards,
--
Fujii Masao
^ permalink raw reply [nested|flat] 3+ messages in thread
* How to release savepoints properly
@ 2020-10-02 11:57 Daniil Megrabyan <danil.megrabjan@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Daniil Megrabyan @ 2020-10-02 11:57 UTC (permalink / raw)
To: pgsql-odbc
Hello!
(Preamble: AUTOCOMMIT is off)
When I call SQLExecDirect(SELECT * FROM B...) in the pg_stat_activity I see "idle in transaction" for query "RELEASE _EXEC_SVP_0x10a0df600;SAVEPOINT _EXEC_SVP_0x10a0df600;SELECT * FROM B" even after SQLFreeStmt(SQL_CLOSE + SQL_UNBIND + SQL_RESET_PARAMS).
I guess that first "RELEASE" in the generated query is needed to release currently active savepoint which was executed under the hood (generated in GenerateSvpCommand()) within previous SQLExecDirect(SELECT * FROM A) - in other words we are renewing the savepoint every SQLExecDirect.
In my point of view RELEASE should also be called under the hood(in PGAPI_FreeStmt()) on SQLStmtFree(SQL_CLOSE). Otherwise the last query locks table B forever and I cannot modify table B from other connections.
At the same time I completely understand there is already 12th release and admit that I rather do not understand something and everything is by design.
Should I call just SQLEndTran(despite the fact that just SELECT was executed and nothing really can be rolled back) in such case?
macos 10.15.7
psql-odbc 12.02.0000
unixodbc 2.3.9
Thank you!=
^ permalink raw reply [nested|flat] 3+ messages in thread
* How to release savepoints properly?
@ 2020-10-02 12:29 Daniil Megrabyan <danil.megrabjan@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Daniil Megrabyan @ 2020-10-02 12:29 UTC (permalink / raw)
To: pgsql-odbc@lists.postgresql.org
Hello!
(Preamble: AUTOCOMMIT is off)
When I call SQLExecDirect(SELECT * FROM B...) in the pg_stat_activity I see "idle in transaction" for query "RELEASE _EXEC_SVP_0x10a0df600;SAVEPOINT _EXEC_SVP_0x10a0df600;SELECT * FROM B" even after SQLFreeStmt(SQL_CLOSE + SQL_UNBIND + SQL_RESET_PARAMS).
I guess that first "RELEASE" in the generated query is needed to release currently active savepoint which was executed under the hood (generated in GenerateSvpCommand()) within previous SQLExecDirect(SELECT * FROM A) - in other words we are renewing the savepoint every SQLExecDirect.
In my point of view RELEASE should also be called under the hood(in PGAPI_FreeStmt()) on SQLStmtFree(SQL_CLOSE). Otherwise the last query locks table B forever and I cannot modify table B from other connections.
At the same time I completely understand there is already 12th release and admit that I rather do not understand something and everything is by design.
Should I call just SQLEndTran(despite the fact that just SELECT was executed and nothing really can be rolled back) in such case?
macos 10.15.7
psql-odbc 12.02.0000
unixodbc 2.3.9
Thank you!=
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-10-02 12:29 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 08:24 Re: setLastTid() and currtid() Fujii Masao <masao.fujii@gmail.com>
2020-10-02 11:57 How to release savepoints properly Daniil Megrabyan <danil.megrabjan@gmail.com>
2020-10-02 12:29 How to release savepoints properly? Daniil Megrabyan <danil.megrabjan@gmail.com>
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