Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle duplicate_table errors in system_monitor_pg #29

Open
dszoboszlay opened this issue Nov 16, 2023 · 0 comments
Open

Handle duplicate_table errors in system_monitor_pg #29

dszoboszlay opened this issue Nov 16, 2023 · 0 comments

Comments

@dszoboszlay
Copy link

The query creating new table partitions in system_monitor_pg may crash with duplicate_table error in case multiple nodes are using the same DB:

[{ok, [], []}, {ok, [], []}] = epgsql:squery(Conn, Query)

This was surprising to me, because I was expecting IF NOT EXISTS to avoid this error, but as I've learned on Stackoverflow:

The IF NOT EXISTS is meant to deal idempotency, not concurrency.

🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant