Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system
Date
Msg-id 20130217054654.GB6000@alvh.no-ip.org
Whole thread Raw
In response to Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system  (Tomas Vondra <tv@fuzzy.cz>)
Responses Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system  (Tomas Vondra <tv@fuzzy.cz>)
Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system  (Tomas Vondra <tv@fuzzy.cz>)
List pgsql-hackers
Tomas Vondra wrote:

> I've been thinking about this (actually I had a really weird dream about
> it this night) and I think it might work like this:
>
> (1) check the timestamp of the global file -> if it's too old, we need
>     to send an inquiry or wait a bit longer
>
> (2) if it's new enough, we need to read it a look for that particular
>     database - if it's not found, we have no info about it yet (this is
>     the case handled by the dummy files)
>
> (3) if there's a database stat entry, we need to check the timestamp
>     when it was written for the last time -> if it's too old, send an
>     inquiry and wait a bit longer
>
> (4) well, we have a recent global file, it contains the database stat
>     entry and it's fresh enough -> tadaaaaaa, we're done

Hmm, yes, I think this is what I was imagining.  I had even considered
that the timestamp would be removed from the per-db file as you suggest
here.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Shigeru Hanada
Date:
Subject: Re: FDW for PostgreSQL
Next
From: Amit kapila
Date:
Subject: Re: [PATCH] Add PQconninfoParseParams and PQconninfodefaultsMerge to libpq