| From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
|---|---|
| To: | Kevin Grittner <kgrittn(at)mail(dot)com> |
| Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Materialized views WIP patch |
| Date: | 2012-11-15 04:57:13 |
| Message-ID: | 20121115045712.GD12213@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Kevin Grittner wrote:
Interesting stuff.
> /*
> + * SetRelationIsValid
> + * Set the value of the relation's relisvalid field in pg_class.
> + *
> + * NOTE: caller must be holding an appropriate lock on the relation.
> + * ShareUpdateExclusiveLock is sufficient.
> + *
> + * NOTE: an important side-effect of this operation is that an SI invalidation
> + * message is sent out to all backends --- including me --- causing plans
> + * referencing the relation to be rebuilt with the new list of children.
> + * This must happen even if we find that no change is needed in the pg_class
> + * row.
> + */
> + void
> + SetRelationIsValid(Oid relationId, bool relisvalid)
> + {
It's not clear to me that it's right to do this by doing regular heap
updates here instead of heap_inplace_update. Also, I think this might
end up causing a lot of pg_class tuple churn (at least for matviews that
delete rows at xact end), which would be nice to avoid.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2012-11-15 05:06:49 | Re: Doc patch, put commas in the right place in pg_restore docs |
| Previous Message | Michael Paquier | 2012-11-15 04:08:26 | Re: logical changeset generation v3 |