Re: Why does slony use a cursor? Anyone know?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Shaun Thomas <sthomas(at)optionshouse(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why does slony use a cursor? Anyone know?
Date: 2013-03-06 02:17:14
Message-ID: 20130306021713.GA17980@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 05, 2013 at 08:51:11AM -0600, Shaun Thomas wrote:
> Hey everyone,
>
> Frankly, I'm shocked at what I just found.
>
> We did a delete last night of a few million rows, and come back this
> morning to find that slony is 9-hours behind. After some
> investigation, it became apparent that slony opens up a cursor and
> orders it by the log_actionseq column. Then it fetches 500 rows, and
> closes the cursor. So it's fetching several million rows into a
> cursor, to fetch 500, and then throw the rest away.

I once had a similar problem and it looked like they were missing an
index. I asked about it and it turns out that I was running a somewhat
old version, and it was fixed in later versions.

Check that first. But ask anyway, I've always found the Slony guys very
helpful.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.
-- Arthur Schopenhauer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guy Rouillier 2013-03-06 03:13:47 Re: PostgreSQL connect with Visual C++
Previous Message Greg Lowe 2013-03-05 22:48:14 Postresql database library for Dart programming language