Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i04zB-0000Ph-Ba for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 14:19:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i04zA-0005fY-3x for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 14:19:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i04z9-0005XY-L5 for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 14:19:43 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1i04z6-0006TU-Q5 for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 14:19:42 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 7520B5F79F; Tue, 20 Aug 2019 10:19:39 -0400 (EDT) Date: Tue, 20 Aug 2019 10:19:39 -0400 From: Stephen Frost To: Kyotaro Horiguchi Cc: ronljohnsonjr@gmail.com, pgsql-general@lists.postgresql.org Subject: Re: postmaster utilization Message-ID: <20190820141939.GN16436@tamriel.snowman.net> References: <1580b264-7d47-a741-6acc-3f1ea8ee0d1f@gmail.com> <20190819140730.GH16436@tamriel.snowman.net> <20190820.135338.105588994.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1j8VzAFFoFMghESp" Content-Disposition: inline In-Reply-To: <20190820.135338.105588994.horikyota.ntt@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --1j8VzAFFoFMghESp Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Kyotaro Horiguchi (horikyota.ntt@gmail.com) wrote: > At Mon, 19 Aug 2019 10:07:30 -0400, Stephen Frost wr= ote 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,=A0postmaster CPU % > > > >reaches to 90 - 100%,which results very strange behavior: that we ar= e 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 kn= ow how > > > >we can access the database during the backup window. Please let us k= now on > > > >priority since this is our prod database. > > >=20 > > > Are you compressing the backup? > > > How many threads are you running? > > > How many CPUs on your system? > > > What version of Postgres? > >=20 > > ... What are you using to run the backup? >=20 > It seems to have been reported as BUG #15961.. >=20 > https://www.postgresql.org/message-id/15965-413bf5d18aaeface@postgresql.o= rg >=20 > > PostgreSQL version: 11.4 > > Operating system: CentOS Linux release 7.6.1810 (Core) > > pg_dump -U postgres -d wg -f wg.sql=20 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 --1j8VzAFFoFMghESp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJdXAF7AAoJEO1sijiDR2RVVykQALpXMEAkUpdrlrA94XoTIB0O IV768BiEtZzupxrRgumGUhPtmvOs/X2THoeOZMRNIKc8zd3nY6/K+Lv8KMqkgaju x/iBG7Ptqym/VbmY+sAzcoI+WfSWBnWf9BOIZfJyxL7s43h6VCVywCUQTwEby9Vv ZUgHaPI+9J+BYGzIVC81r1aQbKBwhsNtV8gMvszQ5hS/pANq1eU7e+97SZbloPy/ kOKBRFITTvonKCkPfwwC+PuHl2EIRLozvvXZ/B4EEJK++PRycMf3Qb+dpkoP4Poe En20cKbjdFyyv4+k47sfFqGUT17xro3ZKws/H0I993X7HOKPOXRT1CuNaaz3SqRf JjDwc0W0xzT4C3NTq8ULwzGe0q8X8J1S5SycjS7U+G6o8KD3popiW0PZJfctG/a9 woLnz5xn3SJ/x7N5Yerrq++orKYFv923lXX5uPV+07ELALhsTZZ1/g0+2F2oVtEI Bcju4Td7Wei+3kBkUgii4iUz3FuOCHdpVDiy/htu96BJvEeIuk33hRMENugoYLoA k5/wvvr6opZfNVUfA1bhmWYfbEnkgOOBfUKLk6OyClvMugXvfYlEXn8EMqMB/D/Y nUS9WzfWqI3W31RwtTK+J2++sj/5ML7A0LPmEmY3rzYhe2OSo2bige36vLAwwD9H PbxItO6k7ktnQUhFTvEk =9Qfa -----END PGP SIGNATURE----- --1j8VzAFFoFMghESp--