Re: [GENERAL] Autovacuum stuck for hours, blocking queries

Поиск
Список
Период
Сортировка
От Tim Bellis
Тема Re: [GENERAL] Autovacuum stuck for hours, blocking queries
Дата
Msg-id CY1PR02MB20094F3F31CA8656DF1F1BF4F95A0@CY1PR02MB2009.namprd02.prod.outlook.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Autovacuum stuck for hours, blocking queries  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: [GENERAL] Autovacuum stuck for hours, blocking queries  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: [GENERAL] Autovacuum stuck for hours, blocking queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Thank you all - that's really useful :-)

The other query that gets blocked behind the vacuum is the below (truncated).

This query is generated by jdbc in this method:
org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getIndexInfo(AbstractJdbc2DatabaseMetaData.java:4023)

Even though this is a read only query, is it also expected to be blocked behind the vacuum? Is there a way of getting
indexesfor a table which won't be blocked behind a vacuum? 

Thank you all again,

Tim

SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM,   ct.relname AS TABLE_NAME, NOT i.indisunique AS NON_UNIQUE,   NULL
ASINDEX_QUALIFIER, ci.relname AS INDEX_NAME,   CASE i.indisclustered     WHEN true THEN 1    ELSE CASE am.amname
WHEN'hash' THEN 2      ELSE 3    END   END AS TYPE,   (i.keys).n AS ORDINAL_POSITION,
pg_catalog.pg_get_indexdef(ci.oid,(i.keys).n, false) AS COLUMN_NAME,   CASE am.amcanorder     WHEN true THEN CASE
i.indoption[(i.keys).n- 1] & 1       WHEN 1 THEN 'D'       ELSE 'A'     END     ELSE NULL   END AS ASC_OR_DESC,
ci.reltuplesAS CARDINALITY,   ci.relpages AS PAGES,   pg_catalog.pg_get_expr(i.indpred, i.indrelid) AS FILTER_CONDITION
FROMpg_catalog.pg_class ct   JOIN pg_catalog.pg_namespace n ON (ct.relnamespace = n.oid)   JOIN (SELECT i.indexrelid,
i.indrelid,i.indoption,           i.indisunique, i.indisclustered, i.indpred,           i.indexprs,
information_schema._pg_expandarray(i.indkey)AS keys         FROM pg_catalog.pg_index i) i     ON (ct.oid = i.ind 


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] postgresql how to duplicate rows in result.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Bad planning data resulting in OOM killing of postgres