Limit overall indentation in rule/view dumps.
Continuing to indent no matter how deeply nested we get doesn't really do anything for readability; what's worse, it results in O(N^2) total whitespace, which can become a performance and memory-consumption issue. To address this, once we get past 40 characters of indentation, reduce the indentation step distance 4x, and also limit the maximum indentation by reducing it modulo 40. This latter choice is a bit weird at first glance, but it seems to preserve readability better than a simple cap would do. Back-patch to 9.3, because since commit 62e66640 the performance issue is a hazard for pg_dump. Greg Stark and Tom Lane
Showing
This diff is collapsed.
Please register or sign in to comment