Hi, I'm in the process of deciding whether to use.
-1 sequence per table containing the number of rows
-Using the collected statistics and functions like pg_relation_size
This is my use case:
I have several hundred tables in one database that I would like to
constantly monitor as far as size or number of records.
When a certain threshold is met, I will not allow any further inserts
into that table.
The threshold-met-event can be approximate.
How will I affect the performance of the server if I chose to query
for the system statistics data say, every 5 seconds as opposed to
just reading the latest_value of a sequence that gets updated every time
a row is added to its corresponding table?
Thank you