Re: [PATCH 03/16] Add a new syscache to fetch a pg_class entry via its relfilenode - Mailing list pgsql-hackers

From Christopher Browne
Subject Re: [PATCH 03/16] Add a new syscache to fetch a pg_class entry via its relfilenode
Date
Msg-id CAFNqd5Vi_a7PBp=sBMS1fcZ-7pKS3-ywX80cFSh4VXqN-_z+xw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH 03/16] Add a new syscache to fetch a pg_class entry via its relfilenode  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Jun 14, 2012 at 5:00 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, Jun 14, 2012 at 4:51 PM, Andres Freund <andres@2ndquadrant.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?"


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: WAL format changes
Next
From: Heikki Linnakangas
Date:
Subject: Re: [PATCH 06/16] Add support for a generic wal reading facility dubbed XLogReader