Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tomas Vondra <tv@fuzzy.cz>
Cc: Jeff Janes <jeff.janes@gmail.com>, pgsql-hackers@postgresql.org
Date: 2013-02-15T15:38:58Z
Lists: pgsql-hackers
Tomas Vondra escribió: > On 14.2.2013 20:23, Alvaro Herrera wrote: > > The problem here is that creating these dummy entries will cause a > > difference in autovacuum behavior. Autovacuum will skip processing > > databases with no pgstat entry, and the intended reason is that if > > there's no pgstat entry it's because the database doesn't have enough > > activity. Now perhaps we want to change that, but it should be an > > explicit decision taken after discussion and thought, not side effect > > from an unrelated patch. > > I don't see how that changes the autovacuum behavior. Can you explain > that a bit more? > > As I see it, with the old (single-file version) the autovacuum worker > would get exacly the same thing, i.e. no stats at all. See in autovacuum.c the calls to pgstat_fetch_stat_dbentry(). Most of them check for NULL result and act differently depending on that. Returning a valid (not NULL) entry full of zeroes is not the same. I didn't actually try to reproduce a problem. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Split pgstat file in smaller pieces
- 187492b6c2e8 9.3.0 cited