-
Notifications
You must be signed in to change notification settings - Fork 423
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
add more env var config for postgres #5365
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guilload
approved these changes
Sep 11, 2024
docs/reference/cli.md
Outdated
@@ -838,6 +838,15 @@ Disables [telemetry](../telemetry.md) when set to any non-empty value. | |||
|
|||
`QW_DISABLE_TELEMETRY=1 quickwit help` | |||
|
|||
### QW_POSTGRES_SKIP_MIGRATIONS | |||
|
|||
Don't run database migrations (but verify migrations were run succesfully before, and no unknown migration was run). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
Don't run database migrations (but verify migrations were run succesfully before, and no unknown migration was run). | |
Don't run database migrations (but verify that migrations were run successfully before and that no unknown migration was run). |
docs/reference/cli.md
Outdated
|
||
### QW_POSTGRES_SKIP_MIGRATION_LOCKING | ||
|
||
Don't lock the database during migration. This may increase compatiblity with altenrative databases using the postgres wire protocol. It is dangerous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
Don't lock the database during migration. This may increase compatiblity with altenrative databases using the postgres wire protocol. It is dangerous | |
Don't lock the database during migration. This may increase compatibility with alternative databases using the PostgreSQL wire protocol. However, it is dangerous to use this if you can't guarantee that only one node will run the migrations. |
@@ -0,0 +1,2 @@ | |||
ALTER TABLE shards | |||
DROP IF EXISTS update_timestamps; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
DROP IF EXISTS update_timestamps; | |
DROP IF EXISTS update_timestamp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
add environment variables related to postgres metastore:
QW_POSTGRES_SKIP_MIGRATIONS
: don't run migrations, but verifies all migrations were already runQW_POSTGRES_SKIP_MIGRATION_LOCKING
: prevent locking database for migrations. This might make us more compatible with cockroachdb. We might not be entirely compatible still, as it doesn't support DDL in transaction.QW_POSTGRES_READ_ONLY
: make all connections read-only by default. This isn't really a security feature as we can doBEGIN READ WRITE
to get a rw transaction, but it should prevent involuntary writes. While this doesn't implyQW_POSTGRES_SKIP_MIGRATIONS
, being read only and running migrations always fail (even if migrations are up to date)How was this PR tested?
tested manually against existing databases with missing and all migrations, and added unit test.