On Wed, Mar 06, 2019 at 08:53:57PM +0100, Tomas Vondra wrote: > Not sure. AFAICS that would to require a single transaction, and if we > happen to add some sort of throttling (which is a feature request I'd > expect pretty soon to make it usable on live clusters) that might be > quite long-running. So, not great. > > If we want to run it from the server itself, then I guess a background > worker would be a better solution. Incidentally, that's something I've > been toying with some time ago, see [1].
It does not prevent having a SQL function which acts as a wrapper on top of the whole routine logic, does it? I think that it would be nice to have the possibility to target a specific relation and a specific page, as well as being able to check fully a relation at once. It gets easier to check for page ranges this way, and the throttling can be part of the function doing a full-relation check. -- Michael
signature.asc
Description: PGP signature