pgcat
pgcat copied to clipboard
unrecognized configuration parameter "shard"
Describe the bug
if sharding regex is set, set shard
command is not working
To Reproduce upgrade to v1.0.0 set config
sharding_key_regex = '/\* sharding_key: (\d+) \*/'
shard_id_regex = '/\* shard_id: (\d+) \*/'
Expected behavior
set shard
works together with comment sharding
I'm facing the same issue, but in a slightly different scenario. Contrarily to @DeoLeung I didn't set the regex, however:
- If I run the command like
psql [..] -c "SET SHARD TO '1'; SELECT [..]"
I get the very same error. - If instead, I get into the
psql
CLI, and then from there I runSET SHARD TO '1';
it works properly.
Is psql
starting a transaction for you? SET SHARD TO
must be sent outside explicit transactions (i.e. created with BEGIN
)
@levkk sorry fot the late reply, but I think you got the point. Thanks!