Thank for your response Glyn,
>-Can we see user connections on any system tables(active + past) in postgreSQL, Please share me the SQL if it is possible.
Can you clarify what you want to see here? You can see the current and last queries of connections with "SELECT * FROM pg_stat_activity". If you want auditing or logging of all activity then depending on what you need it's possible with triggers or an extension like pg_audit.
I want to see the list of user who logged into XXX database in last 90 days. How can we do this please