Jan Wieck JanWieck
Fri Feb 24 08:30:45 PST 2006
On 2/23/2006 4:00 AM, Gavin Sherry wrote:
> On Thu, 23 Feb 2006, Jim C. Nasby wrote:
> 
>> On Thu, Feb 23, 2006 at 03:02:14PM +1100, Gavin Sherry wrote:
>> > On Wed, 22 Feb 2006, Darcy Buskermolen wrote:
>> >
>> > > On Wednesday 22 February 2006 08:48, Marc G. Fournier wrote:
>> > > > Is there any work being done on Slony-I replicating DDL's?  And, of
>> > > > course, setting up replication on any TABLES created in the process?
>> > >
>> > > No there is not any work on this.. in order to support this it would require
>> > > hacks to the PG backend..  This could probably be done with Gavin's system
>> > > table trigger patches.  The patches were never accepted for inclusion by
>> > > core.
>> >
>> > The issue, for me, is that there are two ways we could go about
>> > implementing this and both have problems.
>> >
>> > 1) Create triggers on individual system tables.
>> >
>> > If you wanted to know when a new table was created, when a table was
>> > modified or dropped, you would create a trigger on pg_class, I suppose.
>> > The problem, though, is that you might want to see what columns a new
>> > table has but are they visible yet? It's a bit of a can of worms.
>>
>> Visible?? You mean you're worried about about seeing stuff that hasn't
>> committed yet?
> 
> I was implying that it was a timing problem. In the code we create the
> pg_class entry and then populate pg_attribute from memory. We need to be
> careful about where we invoke a trigger on pg_class to make sure all it's
> ramifications are visible -- ie, that we've issued
> CommandCounterIncrement().

Plus having created things like the PK index for the table and other 
constraints.

Which leads to yet another problem. What does Slony do if the admin 
creates a table without a primary or even without any possile candidate 
key? Don't replicate the table? Abort the CREATE TABLE?

And how exactly do I tell Slony (after it got all that super smart to 
master DDL all by itself) that I want a different set of indexes on 
"this particular replica", because that's my search engine server?


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #



More information about the Slony1-general mailing list