Re: HOOKS for Synchronous Replication?

Lists: pgsql-hackers
From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: HOOKS for Synchronous Replication?
Date: 2005-12-08 02:42:42
Message-ID: 43979DA2.9020100@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Anyone remember this patch?

http://gorda.di.uminho.pt/community/pgsqlhooks/

The discussion seems to be pretty minimal:

http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php

Does anyone see a need to investigate it further?

Chris


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2005-12-08 04:24:14
Message-ID: 6215.1134015854@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Anyone remember this patch?
> http://gorda.di.uminho.pt/community/pgsqlhooks/
> The discussion seems to be pretty minimal:
> http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php
> Does anyone see a need to investigate it further?

I had hoped to see some comments from the Slony people about it.
I'd feel better about the validity of a set of hooks if more than
one project agreed that it was useful/appropriate ...

regards, tom lane


From: <pmagnoli(at)systemevolution(dot)it>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2005-12-08 11:10:00
Message-ID: ir6f0o.ipkeuk@mail.systemevolution.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I can only add that patched code did not build on windows, contacted author
about that and never got an answer back.
Regards

paolo

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> ha scritto

> Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > Anyone remember this patch?
> > http://gorda.di.uminho.pt/community/pgsqlhooks/
> > The discussion seems to be pretty minimal:
> > http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php
> > Does anyone see a need to investigate it further?
>
> I had hoped to see some comments from the Slony people about it.
> I'd feel better about the validity of a set of hooks if more than
> one project agreed that it was useful/appropriate ...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>


From: Darcy Buskermolen <darcy(at)wavefire(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2005-12-08 16:33:59
Message-ID: 200512080834.00690.darcy@wavefire.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wednesday 07 December 2005 20:24, Tom Lane wrote:
> Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > Anyone remember this patch?
> > http://gorda.di.uminho.pt/community/pgsqlhooks/
> > The discussion seems to be pretty minimal:
> > http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php
> > Does anyone see a need to investigate it further?
>
> I had hoped to see some comments from the Slony people about it.
> I'd feel better about the validity of a set of hooks if more than
> one project agreed that it was useful/appropriate ...

I missed seeing it all together the first time through, I'll see what I can do
about taking a indepth look at it over the next few days and provide some
feedback.

>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Darcy Buskermolen
Wavefire Technologies Corp.

http://www.wavefire.com
ph: 250.717.0200
fx: 250.763.1759


From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Darcy Buskermolen <darcy(at)wavefire(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2005-12-08 19:05:07
Message-ID: 20051208190506.GD58449@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Dec 08, 2005 at 08:33:59AM -0800, Darcy Buskermolen wrote:
> On Wednesday 07 December 2005 20:24, Tom Lane wrote:
> > Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > > Anyone remember this patch?
> > > http://gorda.di.uminho.pt/community/pgsqlhooks/
> > > The discussion seems to be pretty minimal:
> > > http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php
> > > Does anyone see a need to investigate it further?
> >
> > I had hoped to see some comments from the Slony people about it.
> > I'd feel better about the validity of a set of hooks if more than
> > one project agreed that it was useful/appropriate ...
>
> I missed seeing it all together the first time through, I'll see what I can do
> about taking a indepth look at it over the next few days and provide some
> feedback.

While this code might be useful, whouldn't it be much more valuable to
provide hooks into xlog so that we could do non-trigger-based
replication? (As well as non-trigger-based materialized views...)
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461


From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2005-12-08 19:23:43
Message-ID: 4398883F.1020402@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 12/7/2005 11:24 PM, Tom Lane wrote:

> Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>> Anyone remember this patch?
>> http://gorda.di.uminho.pt/community/pgsqlhooks/
>> The discussion seems to be pretty minimal:
>> http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php
>> Does anyone see a need to investigate it further?
>
> I had hoped to see some comments from the Slony people about it.
> I'd feel better about the validity of a set of hooks if more than
> one project agreed that it was useful/appropriate ...

I am going to look into this in the next couple of days.

Jan

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


From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Darcy Buskermolen <darcy(at)wavefire(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2005-12-08 19:32:19
Message-ID: 36e682920512081132k6a9e38a0mf2d5fad3fd2769e2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 12/8/05, Jim C. Nasby <jim(at)nasby(dot)net> wrote:
>
> While this code might be useful, whouldn't it be much more valuable to
> provide hooks into xlog so that we could do non-trigger-based
> replication? (As well as non-trigger-based materialized views...)
>

If we're going to do hooks for replication, I think we should look at
including xlog. Trigger-based replication is an OLTP performance killer if
you're just looking to do async replication.


From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Darcy Buskermolen <darcy(at)wavefire(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2005-12-08 19:35:27
Message-ID: 43988AFF.5010804@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 12/8/2005 2:05 PM, Jim C. Nasby wrote:

> On Thu, Dec 08, 2005 at 08:33:59AM -0800, Darcy Buskermolen wrote:
>> On Wednesday 07 December 2005 20:24, Tom Lane wrote:
>> > Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>> > > Anyone remember this patch?
>> > > http://gorda.di.uminho.pt/community/pgsqlhooks/
>> > > The discussion seems to be pretty minimal:
>> > > http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php
>> > > Does anyone see a need to investigate it further?
>> >
>> > I had hoped to see some comments from the Slony people about it.
>> > I'd feel better about the validity of a set of hooks if more than
>> > one project agreed that it was useful/appropriate ...
>>
>> I missed seeing it all together the first time through, I'll see what I can do
>> about taking a indepth look at it over the next few days and provide some
>> feedback.
>
> While this code might be useful, whouldn't it be much more valuable to
> provide hooks into xlog so that we could do non-trigger-based
> replication? (As well as non-trigger-based materialized views...)

I don't see why these would be mutually exclusive. A generic API needs
to have them all.

Without having looked at the patch yet, what I expect from an API is
that the backend will (after initialization and becoming a member of a
database) check if this database is replicated. If so load the specific
shared object that implement the backend part of the replication system
and then call an init() function in that. This init() function then will
add callbacks to all the hooks where this particular replication system
wants to be called. So one replication system might want to be called on
commit, just before writing the WAL record, some other system doesn't
care about that, but wants to see the WAL record after it was written.

Jan

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


From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: Jan Wieck <JanWieck(at)yahoo(dot)com>
Cc: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, Darcy Buskermolen <darcy(at)wavefire(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2005-12-08 20:19:57
Message-ID: 36e682920512081219v21014408ma1d70b0e187975c0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

True, I think we need hooks for both methods.

On 12/8/05, Jan Wieck <JanWieck(at)yahoo(dot)com> wrote:
>
> On 12/8/2005 2:05 PM, Jim C. Nasby wrote:
>
> > On Thu, Dec 08, 2005 at 08:33:59AM -0800, Darcy Buskermolen wrote:
> >> On Wednesday 07 December 2005 20:24, Tom Lane wrote:
> >> > Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> >> > > Anyone remember this patch?
> >> > > http://gorda.di.uminho.pt/community/pgsqlhooks/
> >> > > The discussion seems to be pretty minimal:
> >> > > http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php
> >> > > Does anyone see a need to investigate it further?
> >> >
> >> > I had hoped to see some comments from the Slony people about it.
> >> > I'd feel better about the validity of a set of hooks if more than
> >> > one project agreed that it was useful/appropriate ...
> >>
> >> I missed seeing it all together the first time through, I'll see what I
> can do
> >> about taking a indepth look at it over the next few days and provide
> some
> >> feedback.
> >
> > While this code might be useful, whouldn't it be much more valuable to
> > provide hooks into xlog so that we could do non-trigger-based
> > replication? (As well as non-trigger-based materialized views...)
>
> I don't see why these would be mutually exclusive. A generic API needs
> to have them all.
>
> Without having looked at the patch yet, what I expect from an API is
> that the backend will (after initialization and becoming a member of a
> database) check if this database is replicated. If so load the specific
> shared object that implement the backend part of the replication system
> and then call an init() function in that. This init() function then will
> add callbacks to all the hooks where this particular replication system
> wants to be called. So one replication system might want to be called on
> commit, just before writing the WAL record, some other system doesn't
> care about that, but wants to see the WAL record after it was written.
>
>
> Jan
>
> --
> #======================================================================#
> # It's easier to get forgiveness for being wrong than for being right. #
> # Let's break this rule - forgive me. #
> #================================================== JanWieck(at)Yahoo(dot)com #
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>


From: Alfranio Correia Junior <alfranio(at)lsd(dot)di(dot)uminho(dot)pt>
To: pmagnoli(at)systemevolution(dot)it
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOOKS for Synchronous Replication?
Date: 2006-01-03 19:11:14
Message-ID: 43BACC52.6000605@lsd.di.uminho.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I fixed the patch and now it compiles in windows.
The first one did not compile because there were some problems in the
Makefile.
It is currently available for download at
http://gorda.di.uminho.pt/community/pgsqlhooks/.

Regards,

Alfranio