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

Re: Pg_upgrade speed for many tables

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Pg_upgrade speed for many tables
Date: 2012-11-05 21:23:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Nov 5, 2012 at 1:14 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Nov 5, 2012 at 4:07 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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?



In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2012-11-05 21:27:44
Subject: Re: to_char timezone
Previous:From: Tom LaneDate: 2012-11-05 21:23:43
Subject: Re: alter table tablename add column - breaks pl/pgsql function returns tablename

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