mirror of https://github.com/citusdata/citus.git
Add pg_dist_local_group Metadata Table
This change adds the pg_dist_local_group metadata table, which indicates the group id of the current node. It is expected that this table contains one and only one row, which only contains the group id of the node as an integer.pull/1938/head
parent
5df7674923
commit
1e95e4576d
|
@ -8,7 +8,7 @@ EXTENSION = citus
|
|||
EXTVERSIONS = 5.0 5.0-1 5.0-2 \
|
||||
5.1-1 5.1-2 5.1-3 5.1-4 5.1-5 5.1-6 5.1-7 5.1-8 \
|
||||
5.2-1 5.2-2 5.2-3 5.2-4 \
|
||||
6.0-1 6.0-2 6.0-3 6.0-4 6.0-5 6.0-6 6.0-7 6.0-8
|
||||
6.0-1 6.0-2 6.0-3 6.0-4 6.0-5 6.0-6 6.0-7 6.0-8 6.0-9
|
||||
|
||||
# All citus--*.sql files in the source directory
|
||||
DATA = $(patsubst $(citus_abs_srcdir)/%.sql,%.sql,$(wildcard $(citus_abs_srcdir)/$(EXTENSION)--*--*.sql))
|
||||
|
@ -74,6 +74,8 @@ $(EXTENSION)--6.0-7.sql: $(EXTENSION)--6.0-6.sql $(EXTENSION)--6.0-6--6.0-7.sql
|
|||
cat $^ > $@
|
||||
$(EXTENSION)--6.0-8.sql: $(EXTENSION)--6.0-7.sql $(EXTENSION)--6.0-7--6.0-8.sql
|
||||
cat $^ > $@
|
||||
$(EXTENSION)--6.0-9.sql: $(EXTENSION)--6.0-8.sql $(EXTENSION)--6.0-8--6.0-9.sql
|
||||
cat $^ > $@
|
||||
|
||||
NO_PGXS = 1
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* citus--5.2-1--5.2-2.sql */
|
||||
|
||||
/*
|
||||
* Replace oid column in pg_dist_shard_placement with an sequence column.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* citus--6.0-5--6.0-6.sql */
|
||||
/* citus--6.0-6--6.0-7.sql */
|
||||
|
||||
CREATE FUNCTION pg_catalog.get_colocated_table_array(regclass)
|
||||
RETURNS regclass[]
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE citus.pg_dist_local_group(
|
||||
groupid int NOT NULL PRIMARY KEY)
|
||||
;
|
||||
|
||||
/* insert the default value for being the coordinator node */
|
||||
INSERT INTO citus.pg_dist_local_group VALUES (0);
|
||||
|
||||
ALTER TABLE citus.pg_dist_local_group SET SCHEMA pg_catalog;
|
||||
GRANT SELECT ON pg_catalog.pg_dist_local_group TO public;
|
|
@ -1,6 +1,6 @@
|
|||
# Citus extension
|
||||
comment = 'Citus distributed database'
|
||||
default_version = '6.0-8'
|
||||
default_version = '6.0-9'
|
||||
module_pathname = '$libdir/citus'
|
||||
relocatable = false
|
||||
schema = pg_catalog
|
||||
|
|
|
@ -34,6 +34,7 @@ ALTER EXTENSION citus UPDATE TO '6.0-5';
|
|||
ALTER EXTENSION citus UPDATE TO '6.0-6';
|
||||
ALTER EXTENSION citus UPDATE TO '6.0-7';
|
||||
ALTER EXTENSION citus UPDATE TO '6.0-8';
|
||||
ALTER EXTENSION citus UPDATE TO '6.0-9';
|
||||
-- drop extension an re-create in newest version
|
||||
DROP EXTENSION citus;
|
||||
\c
|
||||
|
|
|
@ -39,6 +39,7 @@ ALTER EXTENSION citus UPDATE TO '6.0-5';
|
|||
ALTER EXTENSION citus UPDATE TO '6.0-6';
|
||||
ALTER EXTENSION citus UPDATE TO '6.0-7';
|
||||
ALTER EXTENSION citus UPDATE TO '6.0-8';
|
||||
ALTER EXTENSION citus UPDATE TO '6.0-9';
|
||||
|
||||
-- drop extension an re-create in newest version
|
||||
DROP EXTENSION citus;
|
||||
|
|
Loading…
Reference in New Issue