Skip to content

Add type column to _pico_peer_address

It came through drivers chat discussion.

Now with introduction of pgproto and possibility of new protocols coming as extensions to picodata (radix, etc) our drivers need to get the information about connection details for these protocols.

For example jdbc driver needs to know pg proto listen address of all nodes in the cluster.

Proposed solution is to add type column to _pico_peer_address. This allows to write a query to get all addresses suitable for driver to do load balancing. Something like that:

SELECT 
 address,
 uuid
FROM _pico_peer_address pa 
JOIN _pico_instance pi ON pa.raft_id = pi.raft_id
WHERE type = 'pg';

The question is how do we manage these records. Currently iproto address inserted on join request, so other types should be provided there too.

Edited by Dmitry Rodionov
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information