fix: pin embedded-postgres to PG17 and add Docker-to-Desktop migration guide - #23
Open
exocode wants to merge 5 commits into
Open
Conversation
…n guide ## Problem Paperclip Desktop ships with embedded-postgres 18.x (beta), but existing data directories created by the official Docker deployment use PostgreSQL 17. Pointing Desktop at a Docker data directory fails with a locale incompatibility error because Linux uses 'en_US.utf8' and macOS uses 'en_US.UTF-8'. ## Changes ### scripts/prepare-server.mjs After assembling the server bundle, downgrade embedded-postgres from 18.x to 17.10.0-beta.17 so that Desktop can open existing PG17 data directories (Docker or older Desktop installs) without a manual pg_upgrade. The postgresql.conf locale normalization (lc_* parameters) is handled upstream in paperclipai/paperclip#7894. ### docs/guides/docker-to-desktop-migration.md Step-by-step guide covering: - pg_dump / pg_restore for the one-time LC_COLLATE migration - PAPERCLIP_HOME and config.json setup - Rollback instructions - Alternative: keeping Docker DB as backend for Desktop
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
13 tasks
cpSync throws EINVAL when src and dest are the same inode (hardlinks). Compare inodes via lstatSync instead of resolving symlinks with realpathSync. Also adds realpathSync to imports (unused but harmless, kept for clarity).
This reverts commit ccfdbcf.
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.
Problem
Paperclip Desktop currently ships with
embedded-postgres 18.x(beta). The official Paperclip Docker deployment initializes PostgreSQL 17. Anyone migrating from Docker to Desktop hits two errors in sequence:Error 1 —
postgresql.conflocale mismatch (fixed upstream in paperclipai/paperclip#7894):Error 2 — DB catalog
LC_COLLATEincompatibility:Linux uses
en_US.utf8, macOS usesen_US.UTF-8. PostgreSQL stores the locale atinitdbtime — a cluster initialized on Linux cannot be opened on macOS without migration.Changes
scripts/prepare-server.mjsAfter assembling the server bundle, downgrade
embedded-postgresfrom 18.x to17.10.0-beta.17so Desktop can open existing PG17 data directories (Docker or older Desktop installs) without a manualpg_upgrade.This is intentionally a targeted downgrade with a clear comment marking it as temporary — once
@paperclipai/serverships with PG17 as the default, the block can be removed.docs/guides/docker-to-desktop-migration.mdStep-by-step migration guide covering:
pg_dump/pg_restoreto migrate LC_COLLATE metadataPAPERCLIP_HOMEandconfig.jsonconfiguration for DesktopTesting
Verified end-to-end on macOS arm64:
en_US.utf8) successfully opened by Paperclip Desktop after following the migration guideRelated
postgresql.conflocale normalization