Re: BUG #14208: Inconsistent code modification - 3
От | Andres Freund |
---|---|
Тема | Re: BUG #14208: Inconsistent code modification - 3 |
Дата | |
Msg-id | 20160630165542.m2rvs42r3eu3cmlk@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: BUG #14208: Inconsistent code modification - 3 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #14208: Inconsistent code modification - 3
|
Список | pgsql-bugs |
On 2016-06-30 12:51:51 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > On 2016-06-30 12:40:19 -0400, Tom Lane wrote: > >> Whether or not the toplevel transaction is empty, by the time we get here > >> it would have nentries == nentries_mem, no? > > > Not, if the top-level transaction spilled to disk. > > But doesn't the code stanza just above this loop pull that spillage > back in? Do you mean the following? /* add toplevel transaction if it contains changes */ if (txn->nentries > 0) { ReorderBufferChange *cur_change; if (txn->nentries != txn->nentries_mem) ReorderBufferRestoreChanges(rb, txn, &state->entries[off].fd, &state->entries[off].segno); If so, sure, it pulls changes back in, but only the first static const Size max_changes_in_memory = 4096; ones. We should never reconstruct a whole large transaction in memory... - Andres
В списке pgsql-bugs по дате отправления: