Hi ,
Thanks for reaching out to Microsoft Q&A.
It looks like your pgsql uninstall process was incomplete, leaving behind services, folders, and registry entries on your Windows system. To clean it up completely, start by stopping and deleting any remaining PostgreSQL services. Open cmd as an administrator, run sc query | findstr /i postgresql to list active pgsql services, and if you see any, stop them using net stop <service-name> and delete them with sc delete <service-name>. Next, manually delete any leftover folders such as C:\Program Files\PostgreSQL, C:\Program Files (x86)\PostgreSQL, or pgsql related folders inside your user’s AppData directories. After that, open the registry editor and carefully remove pgsql related entries under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, HKEY_LOCAL_MACHINE\SOFTWARE, and HKEY_CURRENT_USER\SOFTWARE. Also, check for any pgsql related environment variables and remove them. Once everything is cleaned up, restart your system to ensure all changes are applied. If the system still gives issues, you can reinstall the same version of pgsql and then perform a clean uninstall. As for the azure notification you shared, it indicates that the pgsql flexible server named pgserverlab was not found, which typically means it was already deleted or never existed. You can safely ignore that part, as it is unrelated to the cleanup on your Windows machine.
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.