Hi hackers,

I created a small PoC. Please see the attached patches.

REQUIREMENT

Before patching them, patches in [1] must also be applied.


DIFFERENCES FROM PREVIOUS DESCRIPTIONS

* LRG is now implemented as SQL functions, not as a contrib module.
* New tables are added as system catalogs. Therefore, added tables have oid 
column.
* The node_id is the strcat of system identifier and dbid.


HOW TO USE

In the document patch, a subsection 'Example' was added for understanding LRG. 
In short, we can do

1. lrg_create on one node
2. lrg_node_attach on another node

Also attached is a test script that constructs a three-nodes system.


LIMITATIONS

This feature is under development, so there are many limitations for use case.

* The function for detaching a node from a group is not implemented.
* The function for removing a group is not implemented.
* LRG does not lock system catalogs and databases. Concurrent operations may 
cause inconsistent state.
* LRG does not wait until the upstream node reaches the latest lsn of the 
remaining nodes.
* LRG does not support initial data sync. That is, it can work well only when 
all nodes do not have initial data.


[1]: https://commitfest.postgresql.org/38/3610/

Best Regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment: v1-0001-PoC-implement-LRG.patch
Description: v1-0001-PoC-implement-LRG.patch

Attachment: v1-0002-add-doc.patch
Description: v1-0002-add-doc.patch

Attachment: test.sh
Description: test.sh

Reply via email to