Skip site navigation (1) Skip section navigation (2)

Re: extending relations more efficiently

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Browne <cbbrowne(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: extending relations more efficiently
Date: 2012-05-01 17:19:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Christopher Browne <cbbrowne(at)gmail(dot)com> writes:
> Try to make sure that one of the scenarios involves there being
> multiple writers.

> One of the relevant cases is where there are multiple writers, where
> they may wind up fighting over the last page in the table.  If free
> space is in that one page, they might serialize on the request for
> access to that page.

The system is supposed to be designed to avoid that; we try to hand out
pages with free space to different backends.  One of the advantages of
the current page-at-a-time setup is that when there is *no* free space
according to the FSM, each such backend will create and fill its own
page independently.  They do serialize on the extension lock, but the
intervening tuple additions are parallelized.  We have to be careful to
not make that case worse in a multi-page-extension scheme.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Brian WeaverDate: 2012-05-01 17:30:01
Subject: Re: Problem with multi-job pg_restore
Previous:From: Pavel StehuleDate: 2012-05-01 17:15:11
Subject: Re: proposal: additional error fields

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group