Skip to content

Sharding tests do not work (using default settings) #535

@mdashti

Description

@mdashti

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. Switch to the recent commit on main @ 9d1c46a
  2. Follow the instructions in the https://github.com/postgresml/pgcat/blob/main/tests/sharding/README.md
  • start a postgres server
  • run psql -f query_routing_setup.sql
  • start up PgCat by running cargo run --release in the root of the repo
  • run psql -h 127.0.0.1 -p 6432 -f query_routing_test_insert.sql
    - this command does not work, and I run this one instead: PGPASSWORD=sharding_user psql sharded_db -h 127.0.0.1 -p 6432 -U sharding_user -f query_routing_test_insert.sql

Expected behavior
It's expected for the test to run successfully. However, it fails with:


SET SHARDING KEY
INSERT 0 1
psql:query_routing_test_insert.sql:6: ERROR:  syntax error at or near "KEY"
LINE 1: SET SHARDING KEY TO '2';
                     ^

Desktop

  • OS: macOS
  • Version: 1.1.1 (main @ 9d1c46a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions