COMMIT notification

Started by Viacheslav N Tararinabout 23 years ago4 messagesgeneral
Jump to latest
#1Viacheslav N Tararin
taras@dekasoft.com.ua

Hi.
How I can get notification inside database about transaction commiting?
Or where I can modify PgSQL sources for insert this notification?
Thanks.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Viacheslav N Tararin (#1)
Re: COMMIT notification

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

#3Viacheslav N Tararin
taras@dekasoft.com.ua
In reply to: Viacheslav N Tararin (#1)
Re: COMMIT notification

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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Viacheslav N Tararin (#3)
Re: COMMIT notification

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