Does Citus support shard creation using mysql_fdw?

Citus documentation for features master_get_table_metadata:

part_storage_type: The type of storage used for the table. It can be "t" (standard table), "f (external table)" or "c (column column).

But I looked through all the documentation and did not find examples of how to work with tables distributed using the storage type of the "f (foreign table)" section.

I assume that an initial external table can be created using:

CREATE FOREIGN TABLE audit (
    id integer NOT NULL,
    ctime timestamp without time zone DEFAULT now() NOT NULL,
    site_id integer NOT NULL,
    client_id integer,
    done_time timestamp without time zone,
    status text DEFAULT 'NEW' NOT NULL,
    file_id character varying(16) DEFAULT ''::character varying NOT NULL
) SERVER mysql_svr OPTIONS (dbname 'constructor', table_name 'audit');

But how do I distribute such a table after its creation? How will the fragments be created?

Update

I found this

('f). , . ( file_fdw)

: , mysql_fdw?

+4
1

Citus. :

CREATE FOREIGN TABLE audit (
    id integer NOT NULL,
    ctime timestamp without time zone DEFAULT now() NOT NULL,
    site_id integer NOT NULL,
    client_id integer,
    done_time timestamp without time zone,
    status text DEFAULT 'NEW' NOT NULL,
    file_id character varying(16) DEFAULT ''::character varying NOT NULL
) SERVER mysql_svr
 OPTIONS (dbname 'constructor', table_name 'audit');

, :

SELECT * FROM master_create_distributed_table('audit', 'id', 'append');

, :

SELECT master_create_worker_shards('audit', <shard_count>);

, node, , node. , dbname 'constructor' . , , , Citus , node .

, , ( , 8) MySQL, , audit_1, audit_2,..., audit_8.

, , :

SELECT * FROM master_create_distributed_table('audit', 'id', 'append');

, :

SELECT master_create_worker_shards('audit', 8);

Citus node , MySQL-.

:   ALTER TABLE audit_100208 (SET table_name 'audit_1');

, , node Citus node.

, . -, "append", . , Citus. , , . , , .

** ** . , , Q/A : https://groups.google.com/forum/#!forum/citus-users

  • " " , , .

  • SQL PostgreSQL , . , , - , .

  • 'f', master_create_distributed_table.

+4

All Articles