Skip to content

fix: ensure pg-client cache dir is writable before restore#112

Open
veksen wants to merge 1 commit intomainfrom
veksen/fix-pg-cache-tar
Open

fix: ensure pg-client cache dir is writable before restore#112
veksen wants to merge 1 commit intomainfrom
veksen/fix-pg-cache-tar

Conversation

@veksen
Copy link
Copy Markdown
Member

@veksen veksen commented Apr 13, 2026

actions/cache runs tar as the runner user, but /usr/lib/postgresql/ is root-owned. This causes "Cannot mkdir: Permission denied" errors when restoring the postgresql-client cache.

Fixes this by pre-creating the target directory with runner ownership before cache restore, and re-chowning after apt-get install so future cache saves also work correctly.

actions/cache runs tar as the runner user, but /usr/lib/postgresql/
is root-owned, causing Permission denied errors on cache restore.
Pre-create the directory with correct ownership, and re-chown after
apt-get install so future cache saves work correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query Doctor Analysis

View full run details

83 queries analyzed

2 pre-existing issues

Using assumed statistics (10000000 rows/table). For better results, sync production stats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant