how to view the state of a transaction in flight, seeing how many rows have been read or inserted (possible for a transaction in flight?), memory allocations across the various PG processes, etc.
NOTICE: processed 200000 rows, current value is '(5,8)'
NOTICE: processed 200000 rows, current value is '(5,8)'
Regards
Pavel
Pavel - That’s a very interesting function and thanks for sharing your toolbox. The big question of course, is what is the impact on performance, scalability and stability? Would it work inside of a stored function that would allow me write out the progress to a tracking table?
When a IO is bottleneck then counter has zero overhead. The usage is same as any PostgreSQL set returning function. This function should be stable - it is pretty simple