Обсуждение: COMMIT notification
Hi. How I can get notification inside database about transaction commiting? Or where I can modify PgSQL sources for insert this notification? Thanks.
Viacheslav N Tararin <taras@dekasoft.com.ua> writes:
> How I can get notification inside database about transaction commiting?
Um ... what entity, exactly, are you desiring to notify? The
LISTEN/NOTIFY mechanism might work for this. Or not. I'm not sure
what you need to do.
regards, tom lane
Tom Lane пишет: >Viacheslav N Tararin <taras@dekasoft.com.ua> writes: > > >>How I can get notification inside database about transaction commiting? >> >> > >Um ... what entity, exactly, are you desiring to notify? The >LISTEN/NOTIFY mechanism might work for this. Or not. I'm not sure >what you need to do. > > I need to send in my MOM information about fixed transaction. NOTIFY work, message will send on statement execution, but transaction may be rolledback later. Can I tune NOTIFICATION engine to delay messages until transaction commit and discard notification when rollback? Thanks
Viacheslav N Tararin <taras@dekasoft.com.ua> writes:
> NOTIFY work, message will send on statement execution, but transaction
> may be rolledback later.
No, the message is sent at commit. See the man page for NOTIFY.
regards, tom lane