Hot Standby and 64+ subxids (was COPY enhancements) - Mailing list pgsql-hackers

From Simon Riggs
Subject Hot Standby and 64+ subxids (was COPY enhancements)
Date
Msg-id 1255352793.15590.82.camel@ebony
Whole thread Raw
In response to Re: COPY enhancements  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Hot Standby and 64+ subxids (was COPY enhancements)  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, 2009-10-08 at 11:50 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.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



pgsql-hackers by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: Rejecting weak passwords
Next
From: Simon Riggs
Date:
Subject: Re: COPY enhancements