Repository navigation
Conversation
) Prototype. `local postgres start` now runs a postmaster from a portable PostgreSQL + pg_clickhouse bundle instead of a Docker container; `--docker` keeps the container runtime, and an instance keeps the runtime it was created with. - pg_bundle: manifest fetch (no credentials), mandatory sha256 check before extraction, cache in ~/.clickhouse/postgres keyed on name + sha256 prefix, atomic install, cache-first resolution so resumes work offline. - pg_native: initdb via --pwfile with scram-sha-256 and the builtin C.UTF-8 locale, loopback-only postmaster in its own process group, pg_isready readiness, SIGINT then SIGQUIT stop guarded by postmaster.pid and cwd, 0600 state file with credentials and the bundle identity last used. - postgres: one runtime decision for start (select_start_runtime) and ServerInfo::pg_runtime for everything else; Docker-only options and root are usage errors. - `local install postgres@<version>` installs the bundle; `--docker` pulls the image. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… to --docker (#1464) local_postgres_native_test drives install, checksum and manifest failures, start/stop/resume/remove and rollback against a file:// bundle source whose programs are shell scripts, with no network or real PostgreSQL. Tests and the integration battery that exercise the Docker runtime now ask for it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…er (#1464) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…sysv shared memory on Linux (#1464) - As root, initdb and the postmaster drop to `postgres`, else `nobody` (chdir /, setgroups, setgid, setuid before exec); no user is created and the instance directory is chowned to that user. Credentials stay root-only. - The server user must be able to enter every directory on the way to the bundle cache and the instance; otherwise the start fails first with postgres_directory_not_searchable, naming the directory. Nothing is chmodded. - An existing instance runs as the owner of its data directory, so root can start a user's instance; rewritten metadata keeps its owner. - Liveness also accepts a postmaster started on the data directory (-D), for root in a container that cannot read another user's cwd. - Linux: dynamic_shared_memory_type=sysv for initdb and the server, so a small /dev/shm does not fail bootstrap or parallel queries. macOS keeps posix. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ry setting (#1464) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or 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
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.
Why:
local postgresneeds Docker and has no pg_clickhouse. Prototype for #1464: run PostgreSQL natively so local ClickHouse + Postgres + pg_clickhouse works without containers.What:
local postgres startdownloads a sha256-verified bundle from thesdairs/pg-bundlesmanifest, caches it in~/.clickhouse/postgres/, runsinitdband a loopback-only postmaster.--dockerkeeps the container runtime; existing Docker instances resume unchanged.local install postgres@18installs the bundle (--dockerpulls the image).postgresornobody; Linux uses System V shared memory.QA: fmt, both clippy configurations,
cargo test -p clickhousectl, script tests; end to end on macOS arm64, Linux arm64, and as root in anubuntu:24.04container.Risks: root with
HOME=/rootfails by design (postgres_directory_not_searchable) pending a decision on a root-only location.Refs #1464
🤖 Generated with Claude Code