Start-Service : Cannot find any service with service name 'postgresql-x64-11'

Lukas H's Avatar

Lukas H

28 Aug, 2024 08:20 AM

Recently we are unable to start postgresql11 on Visual Studio 2019 image.

We have not changed any dependencies in our project, and according to https://www.appveyor.com/docs/windows-images-software/#databases postgresql11 should be available on Visual Studio 2019, as well as .NET core 3.1 which our project runs on.

Any idea what the issue might be?

  1. Support Staff 1 Posted by Owen McDonnell on 28 Aug, 2024 08:07 PM

    Owen McDonnell's Avatar

    Yes, it seems to have been missed on the last image update. Apologies for that. We are working on an image update now and can add it back for the next image.
    In the meantime, you could add a ps1 file with the following contents to your repo and call it in the install: section of your build.

    
    Write-Host "Installing PostgreSQL 11..." -ForegroundColor Cyan
    
    Write-Host "Downloading..."
    
    $exePath = "$env:TEMP\postgresql-11.17-1-windows-x64.exe"
    (New-Object Net.WebClient).DownloadFile('https://get.enterprisedb.com/postgresql/postgresql-11.17-1-windows-x64.exe', $exePath)
    
    Write-Host "Installing..."
    cmd /c start /wait $exePath --mode unattended --install_runtimes 0 --superpassword Password12!
    Remove-Item $exePath -ErrorAction SilentlyContinue
    
    Write-Host "Setting up services..."
    Stop-Service postgresql-x64-11
    Set-Service -Name postgresql-x64-11 -StartupType Manual
    
    Write-Host "PostgreSQL 11 installed" -ForegroundColor Green
    
  2. Support Staff 2 Posted by Owen McDonnell on 09 Sep, 2024 04:00 AM

    Owen McDonnell's Avatar

    Postgres 11 has been added back to new images released last week.

  3. Owen McDonnell closed this discussion on 09 Sep, 2024 03:05 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM
20 Sep, 2024 05:50 PM