| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | petrum(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #14208: Inconsistent code modification - 3 |
| Date: | 2016-06-30 16:55:42 |
| Message-ID: | 20160630165542.m2rvs42r3eu3cmlk@alap3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On 2016-06-30 12:51:51 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-06-30 16:59:07 | Re: BUG #14208: Inconsistent code modification - 3 |
| Previous Message | Tom Lane | 2016-06-30 16:51:51 | Re: BUG #14208: Inconsistent code modification - 3 |