Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(coderd/database/gen/dump): add optional DB_DUMP_CONNECTION_URL#16243

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 1 commit intomainfrommafredri/chore-allow-custom-db-dump-url
Jan 23, 2025

Conversation

mafredri
Copy link
Member

This change allows the DB dump to be performed without Docker, BYODB.

@mafredrimafredri self-assigned thisJan 23, 2025
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Great idea to include erro context inpanic(err).

Comment on lines +75 to +79
- PostgreSQL 13 (optional if Docker is available)
- *Note*: If you are using Docker, you can skip this step
- on macOS, run `brew install postgresql@13` and `brew services start postgresql@13`
- To enable schema generation with non-containerized PostgreSQL, set the following environment variable:
- `export DB_DUMP_CONNECTION_URL="postgres://postgres@localhost:5432/postgres?password=postgres&sslmode=disable"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Maybe add a warning note regardingpg_dump version compatibility:

DB_DUMP_CONNECTION_URL='postgresql://user:pass@ds918.home:5433/coder_tmp?sslmode=disable' make genpg_dump: error: server version: 16.2 (Debian 16.2-1.pgdg120+2); pg_dump version: 13.18pg_dump: error: aborting because of server version mismatchpanic: dump schema failed: exit status 1goroutine 1 [running]:main.main()        /Users/cian/src/coder/coder/coderd/database/gen/dump/main.go:70 +0x354exit status 2make: *** [Makefile:618: coderd/database/dump.sql] Error 1

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think this is an unlikely scenario, you can usepg_dump@16 withpostgresql@13 but not vice-versa as you saw here. Since we're advising to use an older postgresql server here, you'd really have to make an effort to use an even olderpg_dump 😄

johnstcn reacted with thumbs up emoji
@mafredrimafredri merged commitf27e73d intomainJan 23, 2025
35 checks passed
@mafredrimafredri deleted the mafredri/chore-allow-custom-db-dump-url branchJanuary 23, 2025 16:53
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 23, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@mtojekmtojekmtojek approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mafredri@johnstcn@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp