Re: Finding tables dropped by DROP TABLE CASCADE

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Finding tables dropped by DROP TABLE CASCADE
Date: 2011-08-17 00:45:28
Message-ID: CA+Tgmoa8-nwdOwuhEKLWK7hZwp3_SO-GHLdatw1v96JFtvY+Uw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 16, 2011 at 8:10 PM, Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:
> I'm working on implemeting query cache for pgpool-II. The query cache
> must be deleted if related tables are dropped. Finding tables oids
> from DROP TABLE t1, t2, t3... is easy. Problem is DROP TABLE
> CASCADE. It seems there's no easy way to find table oids which will be
> deleted by DROP TABLE CASCADE. Any idea?

Presumably it would also need to invalidated if someone did ALTER
TABLE (which might recurse into unspecified children).

It sort of seems like what you want to do is snoop the sinval traffic...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2011-08-17 00:52:37 Re: Finding tables dropped by DROP TABLE CASCADE
Previous Message Robert Haas 2011-08-17 00:42:31 Re: synchronized snapshots