pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: ronljohnsonjr@gmail.com
Cc: pgsql-general@lists.postgresql.org
Subject: Re: postmaster utilization
Date: Tue, 20 Aug 2019 10:19:39 -0400
Message-ID: <20190820141939.GN16436@tamriel.snowman.net> (raw)
In-Reply-To: <20190820.135338.105588994.horikyota.ntt@gmail.com>
References: <CAD8gUhgep9R1LXB-5bM_uCNmTUDdee5YJ=V5a58T81pdZxJyOw@mail.gmail.com>
	<1580b264-7d47-a741-6acc-3f1ea8ee0d1f@gmail.com>
	<20190819140730.GH16436@tamriel.snowman.net>
	<20190820.135338.105588994.horikyota.ntt@gmail.com>

Greetings,

* Kyotaro Horiguchi (horikyota.ntt@gmail.com) wrote:
> At Mon, 19 Aug 2019 10:07:30 -0400, Stephen Frost <sfrost@snowman.net> wrote in <20190819140730.GH16436@tamriel.snowman.net>
> > * Ron (ronljohnsonjr@gmail.com) wrote:
> > > On 8/19/19 5:40 AM, Shiwangini Shishulkar wrote:
> > > >We have scheduled postgres full backup on centos 7 machine. DB size is
> > > >around 66 GB. We observed while backup is running, postmaster CPU %
> > > >reaches to 90 - 100%,which results very strange behavior: that we are not
> > > >able to perform any DDL and DML on to the database during the time.
> > > >Please suggest a way to limit it's CPU utilization or else let us know how
> > > >we can access the database during the backup window. Please let us know on
> > > >priority since this is our prod database.
> > > 
> > > Are you compressing the backup?
> > > How many threads are you running?
> > > How many CPUs on your system?
> > > What version of Postgres?
> > 
> > ... What are you using to run the backup?
> 
> It seems to have been reported as BUG #15961..
> 
> https://www.postgresql.org/message-id/15965-413bf5d18aaeface@postgresql.org
> 
> > PostgreSQL version: 11.4
> > Operating system:   CentOS Linux release 7.6.1810 (Core)
> > pg_dump -U postgres -d wg -f wg.sql 

Ah, then the pg_dump is clearly what's locking the tables against DDL.
That wouldn't impact DML though (unless, of course, a DDL was issued and
then blocked behind pg_dump, and then DML was attempted on the same
table as that would then be blocked behind the DDL).

There's not much help for that when you're taking logical backups,
unfortunately.  Of course, you could take physical backups instead.

Thanks,

Stephen

Attachments:

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

view thread (5+ messages)

Message-ID: <20190820141939.GN16436@tamriel.snowman.net>
Permalink:  ../20190820141939.GN16436@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20190820141939.GN16436@tamriel.snowman.net

 · 

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: sfrost@snowman.net, horikyota.ntt@gmail.com, ronljohnsonjr@gmail.com
  Subject: Re: postmaster utilization
  In-Reply-To: <20190820141939.GN16436@tamriel.snowman.net>
  References: <CAD8gUhgep9R1LXB-5bM_uCNmTUDdee5YJ=V5a58T81pdZxJyOw@mail.gmail.com> <1580b264-7d47-a741-6acc-3f1ea8ee0d1f@gmail.com> <20190819140730.GH16436@tamriel.snowman.net> <20190820.135338.105588994.horikyota.ntt@gmail.com> <20190820141939.GN16436@tamriel.snowman.net>

* 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