Re: [PATCH 03/16] Add a new syscache to fetch a pg_class entry via its relfilenode

From: Christopher Browne <cbbrowne(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Mailing Lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH 03/16] Add a new syscache to fetch a pg_class entry via its relfilenode
Date: 2012-06-14 21:18:42
Message-ID: CAFNqd5Vi_a7PBp=sBMS1fcZ-7pKS3-ywX80cFSh4VXqN-_z+xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 14, 2012 at 5:00 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Jun 14, 2012 at 4:51 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> Lets sidetrack this till we have a tender agreement on how to handle DDL ;). I
>> am aware of the issues with rollbacks, truncate et al...
>
> Agreed; I will write up my thoughts about DDL on the other thread.  I
> think that's a key thing we need to figure out; once we understand how
> we're handling that, the correct design for this will probably fall
> out pretty naturally.

I wonder if *an* answer (if not forcibly a perfect one) is to provide
a capturable injection point.

A possible shape of this would be to have a function to which you pass
a DDL statement, at which point, it does two things:
a) Runs the DDL, to make the requested change, and
b) Captures the DDL in a convenient form in the WAL log so that it may
be detected and replayed at the right point in processing.

That's not a solution for capturing DDL automatically, but it's
something that would be useful-ish even today, for systems like Slony
and Londiste, and this would be natural to connect to Dimitri's "Event
Triggers."

That also fits with the desire to have components that are (at least
hopefully) usable to other existing replication systems.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-06-14 21:19:00 Re: [PATCH 06/16] Add support for a generic wal reading facility dubbed XLogReader
Previous Message Heikki Linnakangas 2012-06-14 21:01:42 WAL format changes