Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs

Поиск
Список
Период
Сортировка
От Jakub Wartak
Тема Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs
Дата
Msg-id CAKZiRmw1p_Rz3vYLFB9kXdP2mObrsmJ2NA4uCEeJ6pjLWf1pfQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
Hi Daniel,


On Tue, Jan 30, 2024 at 3:29 PM Daniel Verite <daniel@manitou-mail.org> wrote:

> PFA a rebased version.

Thanks for the patch! I've tested it using my original reproducer and
it works great now against the original problem description. I've
taken a quick look at the patch, it looks good for me. I've tested
using -Werror for both gcc 10.2 and clang 11.0 and it was clean. I
have one slight doubt:

when I run with default pager (more or less):
\set FETCH_COUNT 1000
WITH data AS (SELECT  generate_series(1, 20000000) as Total) select
repeat('a',100) || data.Total || repeat('b', 800) as total_pat from
data;
-- it enters pager, a skip couple of pages and then "q"

.. then - both backend and psql - go into 100% CPU as it were still
receiving (that doesn't happen e.g. with export PAGER=cat).  So I'm
not sure, maybe ExecQueryAndProcessResults() should somewhat faster
abort when the $PAGER is exiting normally(?).

And oh , btw, in v6-0001 (so if you would be sending v7 for any other
reason -- other reviewers -- maybe worth realigning it as detail):

+  int PQsetChunkedRowsMode(PGconn *conn,
+                           int maxRows);

but the code has (so "maxRows" != "chunkSize"):

+PQsetChunkedRowsMode(PGconn *conn, int chunkSize)

-J.



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

Предыдущее
От: Mats Kindahl
Дата:
Сообщение: Re: glibc qsort() vulnerability
Следующее
От: shveta malik
Дата:
Сообщение: Re: Synchronizing slots from primary to standby