> On 26 Feb 2018, at 05:48, Tomas Vondra <tomas.von...@2ndquadrant.com> wrote: > On 02/24/2018 10:45 PM, Magnus Hagander wrote: >> Is it really that invisible? Given how much we argue over adding >> single counters to the stats system, I'm not sure it's quite that >> low. > > I'm a bit unsure where would the flags be stored - I initially assumed > pg_database/pg_class, but now I see mentions of the stats system. > > But I wonder why should this be stored in a catalog at all? The info is > only needed by the bgworker(s), so they could easily flush the current > status to a file every now and then and fsync it. Then after restart, if > you find a valid file, use it to resume from the last OK position. If > not, start from scratch.
Since this allows checksums to be turned off as well, storing a flag in the catalog would mean a issuing a fairly wide update in that case to switch it to False, which might not be ideal. Not that I expect (hope) turning checksums off on a cluster will be a common operation, but thats a fairly large side effect of doing so. cheers ./daniel