From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | autovacuum, reloptions, and hardcoded pg_class tupdesc |
Date: | 2009-01-22 21:18:54 |
Message-ID: | 20090122211854.GL4296@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
So I've been progressing on revising the autovacuum patch to make it
work with the current reloptions. We have a number of options:
1. Call heap_open() for every relation that we're going to check, and
examine the reloptions via the relcache.
I'm not sure that I like this very much. Right now we just plow
ahead using a pg_class seqscan, which avoids locking the relations
just for the sake of verifying whether they need work. However, this
is the cleanest option in terms of modularity breakage.
2. Play some dirty tricks in autovacuum and extract the reloptions from
the bare pg_class tuple ourselves. I think doing this cleanly
requires exporting some internal functions like
GetPgClassDescriptor() from relcache.c.
3. Disallow setting reloptions for pg_class, which (I think) allows us
to avoid having to use GetPgClassDescriptor, but the rest of it is
still a dirty hack.
In particular, if we do either (2) or (3), we'll need to keep an eye on
that code whenever we modify RelationParseRelOptions.
Thoughts?
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2009-01-22 21:28:32 | Re: rmgr hooks (v2) |
Previous Message | Simon Riggs | 2009-01-22 20:45:14 | Re: Pluggable Indexes (was Re: rmgr hooks (v2)) |