Re: Pg_upgrade speed for many tables - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Pg_upgrade speed for many tables
Date
Msg-id 20121105212949.GG19099@momjian.us
Whole thread Raw
In response to Re: Pg_upgrade speed for many tables  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Pg_upgrade speed for many tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Nov  5, 2012 at 01:23:58PM -0800, Jeff Janes wrote:
> On Mon, Nov 5, 2012 at 1:14 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> > On Mon, Nov 5, 2012 at 4:07 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> >> Or have options for pg_dump and pg_restore to insert "set
> >> synchronous_commit=off" into the SQL stream?
> >
> > It would be kind of neat if we had a command that would force all
> > previously-asynchronous commits to complete.  It seems likely that
> > very, very few people would care about intermediate pg_dump states, so
> > we could do the whole dump asynchronously and then do "FORCE ALL
> > COMMITS;" or whatever at the end.
> 
> Yeah, I was wondering what a fool-proof way of doing that would be,
> without implementing a new feature.  Turning synchronous_commits back
> on and then doing and committing a transaction guaranteed to generate
> WAL would do it.
> 
> Would a simple 'select pg_switch_xlog();' always accomplish the desired flush?

That could generate a lot of WAL files if used regularly.  :-(  Does
SELECT txid_current() generate WAL?  I think it does.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: to_char timezone
Next
From: Alvaro Herrera
Date:
Subject: Re: Pg_upgrade speed for many tables