Skip to content

fix: Resource cache cleanup errors with Postgresql 18 - #9621

Merged
taylorsilva merged 1 commit into
concourse:masterfrom
Kump3r:fix-pg18-race
Jun 26, 2026
Merged

taylorsilva merged 1 commit into
concourse:masterfrom
Kump3r:fix-pg18-race

Conversation

@Kump3r

@Kump3r Kump3r commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Changes proposed by this PR

closes #9619

  • created a new pg_error.go file, which has a method isForeignKeyOrRestrictViolation that checks if a PostgreSQL error is either a ForeignKeyViolation or RestrictViolation, as PostgreSQL 18 changed the error code returned for ON DELETE RESTRICT violations from ForeignKeyViolation (23503) to RestrictViolation (23001)
  • Browsed trough code and modified atc/db/resource_cache_lifecycle.go, atc/db/resource_config_factory.go and atc/db/resource_cache_test.go

@Kump3r
Kump3r requested a review from a team June 26, 2026 07:50
@Kump3r Kump3r added the bug label Jun 26, 2026
@taylorsilva
taylorsilva merged commit c2e19c3 into concourse:master Jun 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource cache cleanup errors with Postgresql 18

2 participants