pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael.paquier@gmail.com>
To: Jeremy Finzel <finzelj@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Alter table set logged hanging after writing out all WAL
Date: Thu, 8 Feb 2018 12:46:38 +0900
Message-ID: <20180208034638.GD6599@paquier.xyz> (raw)
In-Reply-To: <CAMa1XUh4RGkaJ+9KYXWYgdX0ydxhHOrEh8XzodCYGBnuf7SMcQ@mail.gmail.com>
References: <CAMa1XUg=9YKo4_VgVNWJZVt7MsKEnui5VnRKL1cyVbJgnmUG9g@mail.gmail.com>
	<20180206071948.GC74355@paquier.xyz>
	<CAMa1XUgkh4UKfDbPoQ3x92pNWGY2M1zJoS0G5pVpDpjRGjLZtA@mail.gmail.com>
	<20180207000149.GA28623@paquier.xyz>
	<CAMa1XUiR72q_cfNoHUJ=yz1H08cEPnZZFh4jHrN1Lp1i=AiE3A@mail.gmail.com>
	<CAMa1XUh4RGkaJ+9KYXWYgdX0ydxhHOrEh8XzodCYGBnuf7SMcQ@mail.gmail.com>

On Wed, Feb 07, 2018 at 11:35:13AM -0600, Jeremy Finzel wrote:
> I was able to get it to finish by just waiting awhile.  To give you an
> idea, the table with no indexes was set logged in 7 minutes.  With the gist
> index, it took 3 hours but finally finished.  It is only writing WAL for
> about the first 30 minutes, then it apparently is not writing any more WAL
> but takes very long to finish.

An idea to reduce the activity would be to temporarily run PostgreSQL on
scissors, by for example disabling full_page_writes and wal_level =
minimal, but don't do that if other sessions are running in parallel,
and take proper backups before doing it.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (7+ messages)

Message-ID: <20180208034638.GD6599@paquier.xyz>
Permalink:  ../20180208034638.GD6599@paquier.xyz/
Also on:    postgresql.org/message-id/20180208034638.GD6599@paquier.xyz

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: michael.paquier@gmail.com, finzelj@gmail.com
  Subject: Re: Alter table set logged hanging after writing out all WAL
  In-Reply-To: <20180208034638.GD6599@paquier.xyz>
  References: <CAMa1XUg=9YKo4_VgVNWJZVt7MsKEnui5VnRKL1cyVbJgnmUG9g@mail.gmail.com> <20180206071948.GC74355@paquier.xyz> <CAMa1XUgkh4UKfDbPoQ3x92pNWGY2M1zJoS0G5pVpDpjRGjLZtA@mail.gmail.com> <20180207000149.GA28623@paquier.xyz> <CAMa1XUiR72q_cfNoHUJ=yz1H08cEPnZZFh4jHrN1Lp1i=AiE3A@mail.gmail.com> <CAMa1XUh4RGkaJ+9KYXWYgdX0ydxhHOrEh8XzodCYGBnuf7SMcQ@mail.gmail.com> <20180208034638.GD6599@paquier.xyz>

* 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