PostgreSQL version

Bart Koelman's Avatar

Bart Koelman

09 Nov, 2022 10:32 AM


I'm trying to use the latest PostgreSQL version (15) on Windows/Ubuntu build workers.

- On Windows, the latest available version in the VS2022 image is v13. I've determined this by opening a remote desktop connection into the worker and looking into C:\Program Files\PostgreSQL.

- On Linux, despite having `stack: postgresql 13.4` in my appveyor.yml, when I run `psql --version` it always prints v15. It seems to completely ignore the version specified. (This is not much of a concern to me, just wanted to point this out.)

Looking at the documentation for Linux at, it states that only PostgreSQL 13 is available, which is no longer correct. The Windows documentation at lists multiple versions, up to v13, which seems to be all that's available at this moment.

Could you please provide PostgreSQL v15 on Windows images as well?

In addition, it would be nice if there was a way on Windows to print the active PostgreSQL version, without knowing the full path (including version number) upfront. Today we have this:
    Write-Output "PostgreSQL version:"
    if ($IsWindows) {
        . "${env:ProgramFiles}\PostgreSQL\13\bin\psql" --version
    else {
        psql --version

  1. Support Staff 1 Posted by Feodor Fitsner on 09 Nov, 2022 06:09 PM

    Feodor Fitsner's Avatar

    Working on the update!

  2. Support Staff 2 Posted by Feodor Fitsner on 11 Nov, 2022 04:32 PM

    Feodor Fitsner's Avatar

    The latest versions of PostgreSQL 14 and 15 have been added to "Visual Studio 2022" image. Other versions bumped.

  3. 3 Posted by Bart Koelman on 12 Nov, 2022 10:21 AM

    Bart Koelman's Avatar

    Thanks for the update. I'm trying to use PostgreSQL v15 on the updated Visual Studio 2022 image, but I can't access it from unit tests:

    [00:15:21] Starting test execution, please wait...
    [00:15:21] A total of 1 test files matched the specified pattern.
    [00:15:34] [ 00:00:09.28]     NoEntityFrameworkTests.WorkItemTests.Can_delete_WorkItem [FAIL]
    [00:15:34]   Failed NoEntityFrameworkTests.WorkItemTests.Can_delete_WorkItem [5 s]
    [00:15:34]   Error Message:
    [00:15:34]    Npgsql.NpgsqlException : Failed to connect to
    [00:15:34] ---- System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it.
    My PR is at and build output at, in case it helps.
  4. Support Staff 4 Posted by Feodor Fitsner on 14 Nov, 2022 02:34 AM

    Feodor Fitsner's Avatar

    AppVeyor Build Agent does not yet support PostgreSQL 15. You have to explicitly start its service somewhere before tests:

    - net start postgresql-x64-15
  5. 5 Posted by Bart Koelman on 15 Nov, 2022 07:21 AM

    Bart Koelman's Avatar

    It's working great now, thanks for your help!

  6. 6 Posted by Bart Koelman on 30 Nov, 2022 10:09 AM

    Bart Koelman's Avatar

    This worked 16 days ago (with the added net start command), but I noticed it started failing again at least 4 days from now. We didn't make any changes. Any idea what's causing the failure?

  7. 7 Posted by Bart Koelman on 30 Nov, 2022 12:17 PM

    Bart Koelman's Avatar

    Please ignore my last message, it's working again. I suspect we experienced timeouts due to busy servers.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? 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