sys.worker_id_from_rowid

Return the worker ID for either all rows returned by the query or a specific row.
sys.worker_id_from_rowid(rowid)

See Querying Row IDs.

This function accepts either the string rowid as its input or a specific rowid value. In most cases you will use the string rowid to return the specific row ID for each row in a set of rows. (If you specify an individual row ID as the input to the function, make sure it is valid; the system does not detect row IDs that are not valid or do not exist.)

To return a meaningful result, always use this function in a query with a table reference, as shown in the following examples.

For example, the row ID specified here is stored on worker node 12:
premdb=# select sys.worker_id_from_rowid(221804300291014656) from match limit 1;
 worker_id_from_rowid 
----------------------
                   12
(1 row)

premdb=# select sys.worker_id_from_rowid(221804300291014656) from sys.const;
 worker_id_from_rowid 
----------------------
                   12
(1 row)

See also Querying Row IDs.