Home:ALL Converter>postgresql: does logical replication include rollback transaction?

postgresql: does logical replication include rollback transaction?

Ask Time:2018-09-06T18:56:04         Author:kingluo

Json Formatter

Does the logical replication parse the WAL files in transaction unit? What about the rollback transaction?

And, what's API to ingress data changes at the receiver side, without replaying them in SQL level? Just like the built-in streaming replication receiver of postgresql, no matter logical or physical.

Edit:

Let me clarify my question more.

The logical streaming flow is shown as below:

postgresql instance (sender, create slot with specific output plugin) -------streaming protocol----------> postgresql instance (receiver, get copy data)

Here the format of the copy data is determined by the output plugin, let's assume it's plain text. Then in straightforward way, we could treat it as SQL statements and replay them in the receiver postgresql, but it's obviously low-efficiency. Is there any low-level API to ingress the copy data?

Author:kingluo,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/52202534/postgresql-does-logical-replication-include-rollback-transaction
yy