Re: Improving connection scalability: GetSnapshotData()

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Daniel Gustafsson <daniel@yesql.se>, Robert Haas <robertmhaas@gmail.com>, "Jonathan S. Katz" <jkatz@postgresql.org>, Alexander Korotkov <a.korotkov@postgrespro.ru>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Peter Geoghegan <pg@bowt.ie>, Bruce Momjian <bruce@momjian.us>, David Rowley <dgrowleyml@gmail.com>
Date: 2020-08-12T17:38:55Z
Lists: pgsql-hackers

Attachments

Hi,

On 2020-08-12 12:24:52 +1200, Thomas Munro wrote:
> On Wed, Aug 12, 2020 at 12:19 PM Andres Freund <andres@anarazel.de> wrote:
> > On 2020-07-29 19:20:04 +1200, Thomas Munro wrote:
> > > On Wed, Jul 29, 2020 at 6:15 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> > > > +static inline FullTransactionId
> > > > +FullXidViaRelative(FullTransactionId rel, TransactionId xid)
> > > >
> > > > I'm struggling to find a better word for this than "relative".
> > >
> > > The best I've got is "anchor" xid.  It is an xid that is known to
> > > limit nextFullXid's range while the receiving function runs.
> >
> > Thinking about it, I think that relative is a good descriptor. It's just
> > that 'via' is weird. How about: FullXidRelativeTo?
> 
> WFM.

Cool, pushed.

Attached are the rebased remainder of the series. Unless somebody
protests, I plan to push 0001 after a bit more comment polishing and
wait a buildfarm cycle, then push 0002-0005 and wait again, and finally
push 0006.

There's further optimizations, particularly after 0002 and after 0006,
but that seems better done later.

Greetings,

Andres Freund

Commits

  1. Try to unbreak 021_row_visibility.pl on mingw.

  2. Fix and test snapshot behavior on standby.

  3. Fix race condition in snapshot caching when 2PC is used.

  4. snapshot scalability: cache snapshots using a xact completion counter.

  5. Fix use of wrong index in ComputeXidHorizons().

  6. Make vacuum a bit more verbose to debug BF failure.

  7. snapshot scalability: Introduce dense array of in-progress xids.

  8. snapshot scalability: Move PGXACT->vacuumFlags to ProcGlobal->vacuumFlags.

  9. snapshot scalability: Move subxact info to ProcGlobal, remove PGXACT.

  10. snapshot scalability: Move PGXACT->xmin back to PGPROC.

  11. snapshot scalability: Don't compute global horizons while building snapshots.

  12. BRIN: Handle concurrent desummarization properly

  13. Track latest completed xid as a FullTransactionId.

  14. Rename VariableCacheData.nextFullXid to nextXid.

  15. snapshot scalability: Move delayChkpt from PGXACT to PGPROC.

  16. Report progress of CREATE INDEX operations