pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Subject: Re: Parallel (concurrent) inserts?
Date: Fri, 25 May 2012 16:13:54 -0700
Message-ID: <4FC01232.1090901@agliodbs.com> (raw)
In-Reply-To: <jpovmi$4hp$1@dough.gmane.org>
References: <jpovmi$4hp$1@dough.gmane.org>


> I'm wondering if there is ia document describing which guarantees (if
> any) PostgreSQL makes about concurrency for various operations? Speaking
> in general (i.e. IO can handle it, number of CPU cores and client
> threads is optimal), are fully concurrent operations (independant and
> non-blocking) possible for:

Yes, there's quite a bit of documentation.  Start here:
http://www.postgresql.org/docs/9.1/static/mvcc.html

> 1) An unindexed table?

Yes.

> 2) A table with 1+ ordinary (default btree) indexes? (are there
> constraints on the structure and number of indexes?)

Yes.

> 3) A table with 1+ unique indexes?

Yes.  Note that locking on the unique index may degrade concurrent
throughput of the input stream though, since we have to make sure you're
not inserting two different rows with the same unique indexed value
simulatenously.  It's work as you expect, though.

> 4) A table with other objects on it (foreign keys, check constraints, etc.)?

Yes.  Also concurrent autonumber (sequence) allocations work fine.

In fact, PostgreSQL has no non-concurrent mode, unless you count temp
tables.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



view thread (4+ messages)  latest in thread

Message-ID: <4FC01232.1090901@agliodbs.com>
Permalink:  ../4FC01232.1090901@agliodbs.com/
Also on:    postgresql.org/message-id/4FC01232.1090901@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: josh@agliodbs.com
  Subject: Re: Parallel (concurrent) inserts?
  In-Reply-To: <4FC01232.1090901@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox