multiwoven icon indicating copy to clipboard operation
multiwoven copied to clipboard

fix(CE): fixed deployment errors for postgres 18+

Open macintushar opened this issue 3 months ago โ€ข 1 comments

Description

Fixes the deployment error below:

Error: in 18+, these Docker images are configured to store database data in a

format which is compatible with "pg_ctlcluster" (specifically, using

major-version-specific directory names).  This better reflects how

PostgreSQL itself works, and how upgrades are to be performed.


See also https://github.com/docker-library/postgres/pull/1259โ 


Counter to that, there appears to be PostgreSQL data in:

    /var/lib/postgresql/data (unused mount/volume)


This is usually the result of upgrading the Docker image without

upgrading the underlying database using "pg_upgrade" (which requires both

versions).


The suggested container configuration for 18+ is to place a single mount

at /var/lib/postgresql which will then place PostgreSQL data in a

subdirectory, allowing usage of "pg_upgrade --link" without mount point

boundary issues.


See https://github.com/docker-library/postgres/issues/37โ  for a (long)

discussion around this process, and suggestions for how to do so.

Related Issue

Type of Change

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] New Connector (Destination or Source Connector)
  • [ ] Breaking change (fix or feature that would impact existing functionality)
  • [ ] Styling change
  • [ ] Documentation update
  • [ ] Refactoring
  • [ ] Chore

How Has This Been Tested?

Ran the deployment and tested Connectors, Models & Syncs

Checklist:

  • [x] Ensure a branch name is prefixed with feature, bugfix, hotfix, release, style or chore followed by / and branch name e.g feature/add-salesforce-connector
  • [ ] Added unit tests for the changes made (if required)
  • [x] Have you made sure the commit messages meets the guidelines?
  • [ ] Added relevant screenshots for the changes
  • [x] Have you tested the changes on local/staging?
  • [ ] Added the new connector in rollout.rb
  • [ ] Have you updated the version number of the gem?
  • [ ] Have you ensured that your changes for new connector are documented in the docs repo or relevant documentation files?
  • [ ] Have you updated the run time dependency in multiwoven-integrations.gemspec if new gems are added
  • [x] Have you made sure the code you have written follows the best practises to the best of your knowledge?

Summary by CodeRabbit

  • Chores
    • Updated database storage configuration to use a dedicated volume for temporal data.
    • Introduced a new standalone volume for database-related temporal data to improve persistence.
    • Refined global volume declarations; existing Redis storage configuration remains unchanged.

macintushar avatar Nov 03 '25 18:11 macintushar

Walkthrough

The docker-compose.yml volume configuration was changed: the PostgreSQL service now mounts a new temporal-pg-data volume at /var/lib/postgresql instead of /var/lib/postgresql/data. Redis and other service definitions remain unchanged; temporal-pg-data is declared in top-level volumes.

Changes

Cohort / File(s) Change Summary
Docker Compose Volume Configuration
docker-compose.yml
Replaced mount path /var/lib/postgresql/data with /var/lib/postgresql for the DB service and introduced a new top-level volume temporal-pg-data, mounted at /var/lib/postgresql. Existing volumes mw-pg-data and mw-redis-data remain declared.

Estimated code review effort

๐ŸŽฏ 1 (Trivial) | โฑ๏ธ ~3 minutes

  • Single declarative config file change; no runtime logic.
  • Pay attention to potential impacts on existing data directories and volume naming in deployments.

Poem

๐Ÿฐ I hopped through compose with a curious cheer,
I moved some bytes to a new home near,
temporal-pg-data now holds the seed,
PostgreSQL naps where roots proceed,
A tiny hop โ€” persistent cheer! ๐Ÿฅ•

Pre-merge checks and finishing touches

โœ… Passed checks (2 passed)
Check name Status Explanation
Title check โœ… Passed The title accurately describes the main change: fixing deployment errors for PostgreSQL 18+ by updating the docker-compose configuration.
Description check โœ… Passed The pull request description follows the template structure with all required sections completed, including a clear explanation of the bug fix, type of change marked, testing details provided, and relevant checklist items addressed.
โœจ Finishing touches
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch fix/compose-yml

๐Ÿ“œ Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 97aea343fa67e0be43536001116c1ecfe4f9dce6 and f930b49b8a6acdaf6bfdda38af8dfbfa35cb5d51.

๐Ÿ“’ Files selected for processing (1)
  • docker-compose.yml (2 hunks)
๐Ÿ”‡ Additional comments (1)
docker-compose.yml (1)

12-12: Verify .env.example and environment configuration match PostgreSQL 18+ requirements.

A previous review flagged that TEMPORAL_POSTGRESQL_VERSION in .env.example still defaults to 13, which uses /var/lib/postgresql/data as the data directory. However, the mount path changes here require PostgreSQL 18+. This version mismatch creates a breaking change for existing deployments.

Confirm that the following were updated (not visible in this file):

  • .env.example and any other .env* files now set TEMPORAL_POSTGRESQL_VERSION=18 (or appropriate 18+ version)
  • Documentation or migration guide added explaining the PostgreSQL 18 requirement and upgrade steps
  • Any related Helm charts or deployment configurations (if applicable) updated similarly

Also applies to: 55-55, 94-96


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 03 '25 18:11 coderabbitai[bot]