Re: old_snapshot_threshold allows heap:toast disagreement
От | Robert Haas |
---|---|
Тема | Re: old_snapshot_threshold allows heap:toast disagreement |
Дата | |
Msg-id | CA+TgmoYesW_Db-QJ_FiMJi4TD0dm5OHUTNBJvj+RW0wXBNXfXA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: old_snapshot_threshold allows heap:toast disagreement (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: old_snapshot_threshold allows heap:toast disagreement
|
Список | pgsql-hackers |
On Thu, Jul 28, 2016 at 7:29 PM, Andres Freund <andres@anarazel.de> wrote: > I think just iterating through the active snapshots would have been > fine. Afaics there's no guarantee that the first active snapshot pushed > is the relevant one - in contrast to registered one, which are ordered > by virtue of the heap. I think the oldest snapshot has to be on the bottom of the stack; how not? >> > Hm. Could we perhaps assert that the session has a valid xmin? >> >> I don't think so. CLUSTER? > > That should have one during any toast lookups afaics - the relevant code > is > /* Start a new transaction for each relation. */ > StartTransactionCommand(); > /* functions in indexes may want a snapshot set */ > PushActiveSnapshot(GetTransactionSnapshot()); > /* Do the job. */ > cluster_rel(rvtc->tableOid, rvtc->indexOid, true, stmt->verbose); > PopActiveSnapshot(); > CommitTransactionCommand(); > right? And > Snapshot > GetSnapshotData(Snapshot snapshot) > { > ... > > if (!TransactionIdIsValid(MyPgXact->xmin)) > MyPgXact->xmin = TransactionXmin = xmin; > sets xmin. Hmm, OK, I'll have to check on that. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: