From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: autovacuum, reloptions, and hardcoded pg_class tupdesc |
Date: | 2009-01-22 23:47:58 |
Message-ID: | 20090122234758.GP4296@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > 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.
>
> We should stick with that, and refactor the reloptions code as needed to
> be able to work from just a pg_class tuple. I'm envisioning a scheme
> like:
>
> bottom level: extract from pg_class tuple, return a palloc'd struct
>
> relcache: logic to cache the result of the above
>
> top level: exported function to return a cached options struct
>
> The autovac scan could use the bottom-level API.
I'm not sure that we have any use for the top level you propose; the
attached patch just uses the two lower levels, and I think it fits
autovacuum usage just fine. Thanks for the idea.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Attachment | Content-Type | Size |
---|---|---|
relcache-reloptions.patch | text/x-diff | 4.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2009-01-22 23:54:43 | Re: Pluggable Indexes (was Re: rmgr hooks (v2)) |
Previous Message | Tom Lane | 2009-01-22 23:45:57 | Re: Pluggable Indexes |