pgcat icon indicating copy to clipboard operation
pgcat copied to clipboard

#829: read/write splitting on CTE mutable statements

Open jgoday opened this issue 4 months ago • 0 comments

Tries to fix #829.

Checks if a CTE query has some update/insert statements to infer primary server role (query_router::infer)

It defines a private 'query_is_mutable_statement' function to recursive check if a query contains some mutable expression (insert or update).

An additional test (test_split_cte_queries) is defined to check if a CTE query with an update statement is correctly assigned with a primary role

jgoday avatar Oct 16 '24 18:10 jgoday