Copy the two attached files to $PGXC_INSTALL_BASE/share/extension
on each data node. Then connect to a coordinator and try to create it. When I do it, I get errors:
# CREATE EXTENSION nodeid; WARNING: unexpected EOF on datanode connection WARNING: unexpected EOF on datanode connection ERROR: type "node_id" already exists
Try again and find you've been disconnected:
# CREATE EXTENSION nodeid; You are currently not connected to a database.
So reconnect and try again:
# \c dwheeler # CREATE EXTENSION nodeid; ERROR: type "node_id" already exists
No EOF warnings this time, but still, where is this data type defined? I can't find it on this coordinator:
# \dT+ node.* List of data types Schema | Name | Internal name | Size | Elements | Access privileges | Description --------+------+---------------+------+----------+-------------------+------------- (0 rows)
But I connect to a data node, and now I can see it:
=# \dT+ node* List of data types Schema | Name | Internal name | Size | Elements | Access privileges | Description --------+---------+---------------+-------+----------+-------------------+------------- public | node_id | node_id | tuple | | | (1 row)
I have four coordinators and four data nodes. The data type appears to be present on all of the data nodes and all of the coordinators except for the one I actually connected to.
There is no way for me to clean this up, either, short of dropping the database in which I attempted to create the extension (or the schema with CASCADE).
I have two questions about this issue:
What causes the error such that the coordinator I'm connected to thinks that the node_id type is not created when it manages to be created on the other nodes?
How could it be present on any other nodes at all? If there was an error, shouldn't thinks have been rolled back to prevent their creation? Could there be a two-phase commit issue here?
Thanks!
Log output. From the coordinator on which I ran the command:
From the primary data node:
From another coordinator:
And another data node:
A third data node looks pretty ugly:
Curious that I have problems with no other extensions or loads. I will dig into the GTM warnings, though.