I am fairly new to docker and I was changing some settings in postgres.conf inside my timescaledb container running on WSL2. I promptly restarted the container to apply my changes and it appears that I have added an unnecessary comma and the container will not start. Below is the log that reflects this.
2021-07-20 17:02:59.933 GMT [1] LOG: syntax error in file "/var/lib/postgresql/data/postgresql.conf" line 59, near token ","
2021-07-20 17:02:59.933 GMT [1] FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2021-07-20 17:49:58.494 GMT [1] LOG: syntax error in file "/var/lib/postgresql/data/postgresql.conf" line 59, near token ","
2021-07-20 17:49:58.494 GMT [1] FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors
Now, the container always fails to start upon restart. I have no backups of this container and it contains about 100gb of data. The way I see it right now, there are three options:
- Is there is any way that I could start this container without postgres/timescaledb running so that way I can go in an fix the comma. This would be the easiest option.
- Is this some place where I would have to go into the internal file system on the host machine to fix the comma?
- Restarting the container from the base image (I really do not want to do this)
Any help would be greatly appreciated. Below are some details about my environment:
Client:
Cloud integration: 1.0.14
Version: 20.10.6
API version: 1.41
Go version: go1.16.3
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
OS/Arch: linux/amd64
Experimental: false
REPOSITORY TAG
timescale/timescaledb 2.3.1-pg13