Re: Changeset Extraction v7.6.1

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changeset Extraction v7.6.1
Date: 2014-02-21 13:56:39
Message-ID: 20140221135639.GD28858@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-02-21 08:51:03 -0500, Robert Haas wrote:
> On Fri, Feb 21, 2014 at 8:27 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > On 2014-02-21 08:16:59 -0500, Robert Haas wrote:
> >> On Fri, Feb 21, 2014 at 6:07 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> >> > I can sympathize with the "too much during init" argument, but I don't
> >> > see how moving stuff to the first call would get rid of the problems. If
> >> > we fail later it's going to be just as confusing.
> >>
> >> No, it isn't. If you fail during init the use will expect the slot to
> >> be gone. That's the reason for all of this complexity. If you fail
> >> on first use, the user will expect the slot to still be there.
> >
> > The primary case for failing is a plugin that either doesn't exist or
> > fails to initialize, or a user aborting the init. It seems odd that a
> > created slot fails because of a bad plugin or needs to wait till it
> > finds a suitable snapshot record. We could add an intermediary call like
> > pg_startup_logical_slot() but that doesn't seem to have much going for
> > it?
>
> Well, we can surely detect a plugin that fails to initialize before
> creating the slot on disk, right?

We could detect whether the plugin .so can be loaded and provides the
required callbacks, but we can't initialize it.

> I'm not sure what "fails to initialize" entails.

elog(ERROR, 'hey, the tables I require are missing');

or similar.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hadi Moshayedi 2014-02-21 14:11:53 Cost estimation in foreign data wrappers
Previous Message Alvaro Herrera 2014-02-21 13:53:36 Re: WAL Rate Limiting