0

I currently run PostgreSQL 12.4 on Windows 10. Since the "BigSQL" distribution is no longer around, the only choice is to use the EnterpriseDB installer for the initial installation: https://www.postgresql.org/download/windows/

While the EnterpriseDB installer tends to be messy and broken, I do manage to install PostgreSQL after quite a bit of cursing and sweating on each new installation of Windows. However, it's definitely not something I want to do on a regular basis, and certainly not repeat manually for each new minor patch.

Since PostgreSQL is the core of my entire digital existence, I want to streamline the updating of it. I'm still unsure whether or not it's even possible to automate the updating to new non-minor versions, but I wish to do it at least for minor "patches", especially if they fix security issues.

I know of the pg_upgrade command/binary, but this appears to have nothing to do with updating the actual software -- only to migrate the data after a major update of the binaries/software has taken place: https://www.postgresql.org/docs/current/pgupgrade.html

I'm aware that the very page I linked to says:

Advanced users can also download a zip archive of the binaries, without the installer.

However, in the same paragraph, it also mentions:

This download is intended for users who wish to include PostgreSQL as part of another application installer.

This clearly is not my use-case, as I am not bundling PostgreSQL with anything. All I want is to fetch the latest binaries to keep up to date and secure without constant manual labor. Inspecting the ZIP archive of the PG 12.8 installer's ZIP distribution, it seems to differ vastly from the install dir currently on my machine. I'm not at all convinced that it would be safe or sensible to simply auto-download the ZIP and extract it into the install dir as a way of updating. It feels like that would break and/or make a mess of things. And even if it would work fine, what is the "official" way?

I've also looked around in the install dir, but I can't find anything related to updating it. Unless I misremember, the BigSQL distribution had some sort of special CLI tool which basically allowed you to auto-update PostgreSQL. The EnterpriseDB installation appears to have no such thing, or any instructions whatsoever on how they expect you to maintain it. I wish all I had to do was run pg_update.exe every day and it would check for and install the latest binaries if there is a new minor/patch version available. That's how it should be IMO.

The idea of going to their webpage manually, downloading the installer from scratch and running it, "clicking through" the numerous questions, is just unthinkable. I know that there is a lot of Windows hate among FOSS developers, and rightly so, but hopefully you can understand that in reality, many are stuck with it for reasons that have nothing to do with "gaming" or being technically forced by some company/organization. However, going into details about that will be completely off-topic and ensure that this question will never get answered.

4
  • 1
    "I'm not at all convinced that it would be safe or sensible to simply auto-download the ZIP and extract it into the install dir as a way of updating" - that will work just fine. I do that all the time (although I do "install" from the ZIP archive to begin with as I loathe the installer)
    – user1822
    Commented Sep 19, 2021 at 17:47
  • 1
    alternatively you could try Chocolatey
    – user1822
    Commented Sep 19, 2021 at 17:51
  • 1
    you don't need to guess when new releases are published. There are precisely 4 path releases per year and the dates are published in advance, so you can plan, so this is easy to plan: postgresql.org/developer/roadmap
    – user1822
    Commented Sep 19, 2021 at 18:01
  • 1
    If you want to use the installer, you can use an unattended installation. Commented Sep 20, 2021 at 6:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.