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

Поиск
Список
Период
Сортировка
От Glyn Astill
Тема Re: Why does slony use a cursor? Anyone know?
Дата
Msg-id 1362566969.22078.YahooMailNeo@web133205.mail.ir2.yahoo.com
обсуждение исходный текст
Ответ на Why does slony use a cursor? Anyone know?  (Shaun Thomas <sthomas@optionshouse.com>)
Ответы Re: Why does slony use a cursor? Anyone know?
Список pgsql-general
> From: Shaun Thomas <sthomas@optionshouse.com
> To: PostgreSQL General <pgsql-general@postgresql.org>
> Cc:
> Sent: Tuesday, 5 March 2013, 14:51
> Subject: [GENERAL] Why does slony use a cursor? Anyone know?
>
> 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.
>
> That is quite possibly the least efficient manner I could think of to build a
> sync system, so maybe someone knows why they did it that way?
>
> At least with a regular query, it could sort by the column it wanted, and put a
> nifty index on it for those 500-row chunks it's grabbing. I must be missing
> something...

What version of slony are you on?  The specifics of what you mention don't sound quite right, but it sounds very much
likebug 167 which was fixed in 2.1.2 if I remember correctly. 

Glyn



В списке pgsql-general по дате отправления:

Предыдущее
От: Christian Ullrich
Дата:
Сообщение: Re: PostgreSQL connect with Visual C++
Следующее
От: Alexander Farber
Дата:
Сообщение: Change owner for all tables in a database in one batch