Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:> Here's a patch along those lines.
Looks sane in a quick once-over. Note this needs to be back-patched.
regards, tom lane