On 2016-01-07 17:22, Simon Riggs wrote:

* You call them "logical messages" here, but standby messages in code.
But they only apply to logical decoding, so "logical message" seems a
better name. Can we avoid calling them "messages" cos that will get
confusing.


Yes it's slightly confusing, the "Standby" in the code is mostly for consistency with other "Standby*" stuff in neighbouring code, but that can be changed. I don't have better name than "messages" though, "records" is too generic.

    For standard WAL reply, these are basically noop


We should document that.

Okay.


    These messages can be both transactional (decoded on commit) or
    non-transactional (decoded immediately). Each message has prefix to
    differentiate between individual plugins. The prefix has to be
    registered exactly once (in similar manner as security label
    providers) to avoid conflicts between plugins.


I'm not sure what "transactional" means, nor is that documented.
(Conversely, I think "immediate" fairly clear)

Are they fired only on commit? (Guess so)
Are they fired in the original order, if multiple messages in same
transaction? (Hope so)
Are they fired as they come in the original message sequence, or before
anything else or after everything else? For example, cache invalidation
messages are normally fired right at the end of a transaction, no matter
when they were triggered.


Transnational message is added to the stream same way as any DML operation is and has same properties (processed on commit, original order, duplicate messages are delivered as they are).

The immediate as you say is obvious, they get to logical decoding immediately without dealing with any regards to what's happening around (wal order is still preserved though).

Will make this clearer in the docs.

--
 Petr Jelinek                  http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to