Gaddam Sai Ram <gaddamsairam.n@zohocorp.com> writes:
> We are implementing in-memory index. As a part of that, during index callbacks, under
CurTransactionContext,we cache all the DMLs of a transaction in dlist(postgres's doubly linked list).
> We registered transaction callback, and in transaction pre-commit event(XACT_EVENT_PRE_COMMIT), we
iteratethrough all cached DMLs(dlist) and populate in my in-memory data structure.
This sounds broken on its face --- if you want stuff to survive to
top-level commit, you need to keep it in TopTransactionContext.
CurTransactionContext might be a subtransaction's context that will
go away at subtransaction commit/abort.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers