The description for Event ID 0 from source PostgreSQL cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
postgres: could not write external PID file "C:/Program Files/ArcGIS/Portal/framework/etc/pids/pgsql.pid": Permission denied
Please suggest me how to resolve the issue. Is there any issue with the Antivirus or not.
I think it might be due conflict of PostgreSQL community edition with embedded PostgreSQL version of Portal for ArcGIS. So, to check this, you can stop Service of PostgreSQL in Windows Services and restart the portal service. Let me know how it goes.
There shouldn't be a problem running Postgres on the same machine that's running Portal. Typically, I think you'd want to separate responsibilities for the machine, (database tier should be separate from an application tier), but there shouldn't be a problem. The two instances of PG are installed in separate places, use different ports, etc. First make sure that the account used to run the Portal services has full control or at least read/write to the install directory.