sameersbn / sameersbn/docker-gitlab

Postgresql config file changes overwritten by container somehow. Undesirable side-effects, ie logging.

Open
#1,307 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

wontfix
Dominant language
Shell
Stars
8.1k
Forks
2.1k
Avg merge
17h 47m
Merged PRs (30d)
7

Description

I would prefer that postgresql log directly to files using its own CSV format and rotation. This is best implemented with:

logging_collector = on
log_destination = 'csvlog'
log_filename = '%F.log'

Every time the container is restarted, the log_filename parameter is overwritten. I tried adding the parameter a second time, but then both were overwritten. This is undesirable behavior.

IMHO, whatever mechanism overwrites the file should instead do it only once or only if the file is not newer than some kind of initial initialize file (ie, postgresql.auto.conf)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the container startup mechanism that rewrites PostgreSQL settings, focusing on the log_filename parameter and postgresql.auto.conf. Reproduce the behavior across a container restart and determine whether user-provided settings are overwritten more than once. Done means the requested logging configuration remains intact after restart without duplicate parameters being rewritten.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, postgresql
Domain
databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.