Skip to content

Unable to start PostgreSQL in windows-2025 #13040

@kevinhorvatin-netwrix

Description

@kevinhorvatin-netwrix

Description

The following will error with a permission error. This works in windows-2022

jobs:
- job: Database
  pool:
    vmImage: windows-2025
  steps:
  - checkout: self
    fetchDepth: 1
    clean: true

  - pwsh: |
      Push-Location "$($ENV:PGBIN)"
      &./pg_ctl.exe start -D $ENV:PGDATA
    displayName: "Start Postgres"

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • macOS 26 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

Current image version: '20250907.19.1'

Is it regression?

windows-2022

Expected behavior

PostgreSQL starts without an error

Actual behavior

waiting for server to start.....postgres: could not access directory "C:/Program Files/PostgreSQL/17/data": Permission denied
pg_ctl: could not start server
stopped waiting
Examine the log output.

Repro steps

  1. Create Azure Devops pipeline that trys to start PostgreSQL
  2. add pwsh step
- pwsh: |
      Push-Location "$($ENV:PGBIN)"
      &./pg_ctl.exe start -D $ENV:PGDATA
    displayName: "Start Postgres"
  1. Run pipeline

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions