I’m trying to install the latest postgresql stable version for manjaro. In the past 10 years, I was using Ubuntu, and the pgdg repository was always working for me, as described here:
I’m not sure why it failed to build on your system using yay - I just had no issues building it using Pamac:
pamac build postgresql17
opt/postgresql17/lib/pgxs/src/Makefile.global
==> Creating package "postgresql17"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Adding install file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: postgresql17 17.2-1 (Sat 21 Dec 2024 22:10:50)
==> Cleaning up...
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: Scott (scotty)
Password:
==== AUTHENTICATION COMPLETE ====
Checking keyring... [2/2]
Checking integrity...[2/2]
Loading packages files...[2/2]
Checking file conflicts... [2/2]
Checking available disk space...[2/2]
Installing postgresql17-libs (17.2-1)...[1/2]
Installing postgresql17 (17.2-1)... [2/2]
Running post-transaction hooks...
Creating system user accounts... [1/4]
Creating group 'postgres' with GID 954.
Creating user 'postgres' (PostgreSQL user) with UID 954 and GID 954.
Reloading system manager configuration...[2/4]
Creating temporary files...[3/4]
Arming ConditionNeedsUpdate...[4/4]
Transaction successfully finished.
I assume you have the base-devel & git packages installed on your system? They are required for building many AUR packages.
Edit: I also noticed that your user profile says you are on Stable branch. To use the AUR, it is recommended that users switch to Unstable branch (preferably) or Testing branch, as they are more in line with what is currently in the Arch repos.