Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
От | Kevin Grittner |
---|---|
Тема | Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < |
Дата | |
Msg-id | CACjxUsNs5eomM0v_0PQ9kz3CbfGEBg4H_Bh-fT4nwcyw0jdJSQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < (Kevin Grittner <kgrittn@gmail.com>) |
Ответы |
Re: [HACKERS] Re: pgsql: Avoid extra locks in
GetSnapshotData if old_snapshot_threshold <
|
Список | pgsql-committers |
On Fri, May 6, 2016 at 8:28 PM, Kevin Grittner <kgrittn@gmail.com> wrote: > On Fri, May 6, 2016 at 7:48 PM, Andres Freund <andres@anarazel.de> wrote: >> That comment reminds me of a question I had: Did you consider the effect >> of this patch on analyze? It uses a snapshot, and by memory you've not >> built in a defense against analyze being cancelled. > > Will need to check on that. With a 1min threshold, after loading a table "v" with a million rows, beginning a repeatable read transaction on a different connection and opening a cursor against that table, deleting almost all rows on the original connection, and waiting a few minutes I see this in the open transaction: test=# analyze verbose v; INFO: analyzing "public.v" INFO: "v": scanned 4425 of 4425 pages, containing 1999 live rows and 0 dead rows; 1999 rows in sample, 1999 estimated total rows ANALYZE test=# select count(*) from v; ERROR: snapshot too old Meanwhile, no errors appeared in the log from autovacuum. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-committers по дате отправления: