Hot Standby and 64+ subxids (was COPY enhancements)

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Hot Standby and 64+ subxids (was COPY enhancements)
Date: 2009-10-12 13:06:33
Message-ID: 1255352793.15590.82.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2009-10-08 at 11:50 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > Subcommitting every single row is going to be really painful,
> > especially after Hot Standby goes in and we have to issue a WAL record
> > after every 64 subtransactions (AIUI).
>
> Yikes ... I had not been following that discussion, but that sure sounds
> like a deal-breaker. For HS, not this.

Probably worth expanding this thought...

HS writes a WAL record for subtransactions at the point that the subxid
cache overflows for any single transaction. Current cache size = 64.
Top-level transaction then writes one additional WAL record every
additional 64 subxids after that. These are known as xid assignment
records.

If we execute transactions that completely fit in subxid cache we don't
write any WAL records at all. There is no cumulative effect. So in most
applications, we never write xid assignment records at all.

Does that cover your objection, or do you see other issues?

--
Simon Riggs www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-10-12 13:13:15 Re: COPY enhancements
Previous Message Albe Laurenz 2009-10-12 06:22:52 Re: Rejecting weak passwords