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

Log a warning if PG startup takes too long #810

Closed
nyurik opened this issue Aug 15, 2023 · 0 comments · Fixed by #924
Closed

Log a warning if PG startup takes too long #810

nyurik opened this issue Aug 15, 2023 · 0 comments · Fixed by #924
Labels
enhancement help wanted pg Related to PostgreSQL sources

Comments

@nyurik
Copy link
Member

nyurik commented Aug 15, 2023

Per discussion in #804, Martin should warn users if PostgreSQL discovery step is taking too long.

For each PostgreSQL connection, e.g. in PgConfig::resolve, print a warning if table/function instantiation takes longer than 5 (?) seconds. This could probably be done using this method waiting for the instantiate_tables function. The instantiate_functions could also use some sort of a warning in case we implement retrieving a test tile, but it probably won't have the same message.

So, if instantiate_tables takes over 5 seconds, print something like this:

WARN: PostgreSQL table discovery is taking too long. Make sure your table geo columns have a GIS index, or use --disabling-bounds.
@nyurik nyurik added enhancement help wanted pg Related to PostgreSQL sources labels Aug 15, 2023
nyurik added a commit that referenced this issue Oct 8, 2023
Adds a warning message using the suggested implementation in #810.
Thanks for the recommended approach in the ticket! This one seemed
straightforward enough that local tests would do, which I ran by adding
a delay to `instantiate_tables`.

---------

Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted pg Related to PostgreSQL sources
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant