Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)

Поиск
Список
Период
Сортировка
От Kasahara Tatsuhito
Тема Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)
Дата
Msg-id CAP0=ZVL5Ddc4TVa2sTXHmsO9cFp62FFCEC00ESt4G6bT+bvTpA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (butnot seq_tup_read)  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Список pgsql-hackers
HI,

On Thu, Feb 6, 2020 at 3:24 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
> > I added a new (but minimal)  isolation test for the case of  tid scan.
> > (v12 and HEAD will be failed this test. v11 and HEAD with my patch
> > will be passed)
>
> Isn't this test scenario a bit overkill? We can simply test that
> as follows, instead.
> CREATE TABLE test_tidscan AS SELECT 1 AS id;
> BEGIN ISOLATION LEVEL SERIALIZABLE;
> SELECT * FROM test_tidscan WHERE ctid = '(0,1)';
> SELECT locktype, mode FROM pg_locks WHERE pid = pg_backend_pid() AND mode = 'SIReadLock';
> COMMIT;
>
> In the expected file, the result of query looking at pg_locks
> should be matched with the following.
>
>   locktype |    mode
> ----------+------------
>   tuple    | SIReadLock
Thanks for your reply.
Hmm, it's an simple and  might be the better way than adding isolation test.

I added above test case to regress/sql/tidscan.sql.
Attach the patch.

Best regards,
-- 
Tatsuhito Kasahara
kasahara.tatsuhito _at_ gmail.com

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Index Skip Scan