Skip to content

insights: set PGDATA=/var/lib/postgresql/data/pgdata#269

Merged
emidoots merged 1 commit into
masterfrom
sg/fix-insights-data-2
Feb 26, 2021
Merged

insights: set PGDATA=/var/lib/postgresql/data/pgdata#269
emidoots merged 1 commit into
masterfrom
sg/fix-insights-data-2

Conversation

@emidoots
Copy link
Copy Markdown
Member

I previously thought PGDATA=/var/lib/postgresql/data/pgdata was the default,
but it is definitely not: /var/lib/postgresql/data is.

I removed this from deploy-codeinsights-db.sh for consistency with the Docker
Compose deployment, but this would have broken existing pure-docker deployments
because they were storing data in the pgdata subdirectory previously.

I have added this to Docker Compose deployments here, for consistency, although
it is not strictly required (Docker Compose volumes, unlike Kubernetes ones, do
not appear ot have a lost+found file in them and as such Postgres is happy to
use the root of the volume - whereas in Kubernetes deployments it will complain
the directory is not empty and fail to start.)

Signed-off-by: Stephen Gutekanst stephen@sourcegraph.com

Checklist

I previously thought `PGDATA=/var/lib/postgresql/data/pgdata` was the default,
but it is definitely not: `/var/lib/postgresql/data` is.

I removed this from `deploy-codeinsights-db.sh` for consistency with the Docker
Compose deployment, but this would have broken existing pure-docker deployments
because they were storing data in the `pgdata` subdirectory previously.

I have added this to Docker Compose deployments here, for consistency, although
it is not strictly required (Docker Compose volumes, unlike Kubernetes ones, do
not appear ot have a `lost+found` file in them and as such Postgres is happy to
use the root of the volume - whereas in Kubernetes deployments it will complain
the directory is not empty and fail to start.)

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
@emidoots emidoots added this to the 3.26 milestone Feb 26, 2021
emidoots pushed a commit to sourcegraph/deploy-sourcegraph that referenced this pull request Feb 26, 2021
See sourcegraph/deploy-sourcegraph-docker#269

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
@davejrt davejrt self-requested a review February 26, 2021 23:08
@emidoots emidoots merged commit 299827e into master Feb 26, 2021
@emidoots emidoots deleted the sg/fix-insights-data-2 branch February 26, 2021 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants