Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature
От | Alvaro Herrera |
---|---|
Тема | Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature |
Дата | |
Msg-id | 20160409022855.GA728723@alvherre.pgsql обсуждение исходный текст |
Список | pgsql-hackers |
Kevin Grittner wrote: > Add the "snapshot too old" feature > > This feature is controlled by a new old_snapshot_threshold GUC. A > value of -1 disables the feature, and that is the default. The > value of 0 is just intended for testing. Above that it is the > number of minutes a snapshot can reach before pruning and vacuum > are allowed to remove dead tuples which the snapshot would > otherwise protect. The xmin associated with a transaction ID does > still protect dead tuples. A connection which is using an "old" > snapshot does not get an error unless it accesses a page modified > recently enough that it might not be able to produce accurate > results. I think this formulation of TestForOldSnapshot as returning the Page it checks is a bit strange; you seem to have done it that way only to be able to write BufferGetPage in a reasonable manner. I vote for changing both those macros into inline functions instead, pursuant to https://www.postgresql.org/message-id/20160409020835.GA727750%40alvherre.pgsql and have TestForOldSnapshot return void. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: