Fwd: Questions about connection clean-up and "invalid page header"

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Fwd: Questions about connection clean-up and "invalid page header"
Дата
Msg-id 407d949e1001250556t36ede117x3bf424da81d83bb3@mail.gmail.com
обсуждение исходный текст
Ответы Re: Fwd: Questions about connection clean-up and "invalid page header"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Given this thread on pgsql-general I wonder if we should have
something like 1 in every 1,000 CHECK_FOR_INTERRUPTS check if the
client socket is still open.

This has come up in the past and the concern was that syscalls would
be way too slow to put in critical loops but perhaps if it's only done
once every n checks it would be possible to find a good tradeoff?


---------- Forwarded message ----------
From: Greg Stark <gsstark@mit.edu>
Date: Mon, Jan 25, 2010 at 1:52 PM
Subject: Re: Questions about connection clean-up and "invalid page header"
To: Herouth Maoz <herouth@unicell.co.il>
Cc: Scott Marlowe <scott.marlowe@gmail.com>, pgsql-general@postgresql.org


On Mon, Jan 25, 2010 at 1:16 PM, Herouth Maoz <herouth@unicell.co.il> wrote:
> Well, I assume by the fact that eventually I get an "Unexpected end of file"
> message for those queries, that something does go in and check them. Do you
> have any suggestion as to how to cause the postgresql server to do so
> earlier?

No, Postgres pretty intentionally doesn't check because checking would
be quite slow.

If this is a plpgsql function looping you can put a RAISE NOTICE in
the loop periodically. I suppose you could write such a function and
add it to your query but whether it does what you want will depend on
the query plan.

--
greg



-- 
greg


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Review: listagg aggregate
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Review: listagg aggregate