Re: HOOKS for Synchronous Replication

From: Alvaro Herrera <alvherre(at)surnet(dot)cl>
To: Alfranio Correia Junior <alfranio(at)lsd(dot)di(dot)uminho(dot)pt>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: HOOKS for Synchronous Replication
Date: 2005-06-20 18:34:03
Message-ID: 20050620183403.GD7864@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 20, 2005 at 11:03:45AM +0100, Alfranio Correia Junior wrote:

Alfranio,

> The implementation of a set of hooks for efficient synchronous replication
> without extensive patching of Postgresql source is now available at:
>
> http://gorda.di.uminho.pt/community/

Some random coments, from general eyeballing the patch:

First of all your patch does not conform with the project style. Please
have a look at how other files are indented, in particular regarding
brace position and ereport() arguments (any function arguments really,
but in ereport your problems are more visible). Also, always use
ereport() for user messages, elog() for conditions that involve
can't-happen situations (server bugs, like not finding a tuple in a
catalog that should be there, etc).

Also there are some changes that you certainly don't want committed.
For example why are you removing the TransState from xact.c?

Also, consider using the XactCallback mechanism instead of inventing
your own.

On a different front, have you considered talking to the people behind
Slony-II to see if they'd have some use for your hooks?

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
Thou shalt check the array bounds of all strings (indeed, all arrays), for
surely where thou typest "foo" someone someday shall type
"supercalifragilisticexpialidocious" (5th Commandment for C programmers)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-06-20 18:40:04 Re: buildfarm notifications
Previous Message Robert Treat 2005-06-20 18:20:54 Re: buildfarm notifications