Commit Graph

8 Commits (7a8d06b2252a8c8d4fb97ce0cb6849c9d2f2252f)

Author SHA1 Message Date
Önder Kalacı 7a8d06b225 Merge 019f8219d2 into 9f9fc09320 2017-01-25 08:49:48 +00:00
Onder Kalaci 019f8219d2 Decouple reference table replication from master_add_node
This commit does the followings:

 - Refactor reference table replication logic for replicating to a
   single node instead of always replicating to all nodes
 - Add a new parameter to master_add_node(..,.., activate_node
   DEFAULT true)
   - If activate is true, replicate reference tables
   - Else, do not replicate reference tables
 - New API for activating node: master_activate_node(host, port)
    - currently only replicates reference tables
2017-01-23 18:11:55 +02:00
Jason Petersen 56197dbdba
Add replication_model GUC
This adds a replication_model GUC which is used as the replication
model for any new distributed table that is not a reference table.
With this change, tables with replication factor 1 are no longer
implicitly MX tables.

The GUC is similarly respected during empty shard creation for e.g.
existing append-partitioned tables. If the model is set to streaming
while replication factor is greater than one, table and shard creation
routines will error until this invalid combination is corrected.

Changing this parameter requires superuser permissions.
2017-01-23 09:05:14 -07:00
Onder Kalaci bd825be340 Improve heap access methods
This commit improves heap access methods for reference table
upgrade and colocation group modifications.
2017-01-20 14:53:29 +02:00
Eren Basak e7c15ecc1f Make `upgrade_to_reference_table` function MX-compatible 2017-01-18 16:49:50 +03:00
Burak Yucesoy b2c61be4a2 Add ORDER BY clause to shard state tests to have consistent output
In tests related to automatic reference table creation and deletion, there were some
tests whose output may change order thus creating inconsistent test results. With this
change we add ORDER BY clause to related tests to have consistent output.
2017-01-13 02:42:28 +03:00
Burak Yucesoy 1d18950860 Modify tests to create clean workspace
Since we will now replicate reference tables each time we add node, we need to ensure
that test space is clean in terms of reference tables before any add node operation.
For this purpose we had to change order of multi_drop_extension test which caused
change of some of the colocation ids.
2017-01-05 12:22:44 +03:00
Burak Yucesoy 31cd2357fe Add upgrade_to_reference_table
With this change we introduce new UDF, upgrade_to_reference_table, which can be used to
upgrade existing broadcast tables reference tables. For upgrading, we require that given
table contains only one shard.
2017-01-02 17:54:42 +02:00