Open
Description
Is your feature request related to a problem? Please describe.
The custom SQL introduced for selecting shard and replicas is functional but it makes transition to a sharded environment and testing less transparent. It would be better if we could follow https://github.com/ossc-db/pg_hint_plan kind of approach where the SET SHARDING KEY TO ...
and SET SERVER ROLE TO '(PRIMARY|REPLICA|ANY|AUTO|DEFAULT)'
is into comments like:
/*+ SET SERVER ROLE TO '(PRIMARY|REPLICA|ANY|AUTO|DEFAULT)' +*/
to set the right behaior.
Describe the solution you'd like
Use comment based way of enabling shard / replica selection.
Describe alternatives you've considered
separate pools and application logic.
Additional context