I have a table
Customer with fields
account_balance, etc. At the end of every month at midnight I want to copy the whole list of customers with their account balance to another table(
The problem is if the table grows large, the time to copy will keep on increasing and it would allow system to make changes to the balance while it's being copied.
How can I solve this problem? The database I am using is Postgresql 10.6