For monitoring database behaviour and trying to build an history of activity, if I would create an application that creates a single connection and execute something like:
select * from pg_stat_activity;
select * from pg_stat_database;
select * from pg_stat_bgwriter;
select * from pg_stat_wal;
select * from pg_settings;
select * from pg_database;
For which the query is prepared, and execute that every 1 second, would there be any realistic danger or overhead that should be considered?
My thinking is that the data for these catalogs are all in shared memory and when executed serially and do not cause any significant resources to be taken?
Thanks,