Re: [BUG] postgresql replaying WAL slowly when master drop a largenumber of relations in one transaction

From: 158306855 <anderson2013(at)qq(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [BUG] postgresql replaying WAL slowly when master drop a largenumber of relations in one transaction
Date: 2018-05-31 03:58:53
Message-ID: tencent_B86EF91E968EDDCE5ACFEEB5BF79ACC6BC07@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

oh, nice patch. It solves the problem and is very grateful.

------------------ Original ------------------
From: "Michael Paquier"<michael(at)paquier(dot)xyz>;
Date: Thu, May 31, 2018 01:20 AM
To: "158306855"<anderson2013(at)qq(dot)com>;
Cc: "pgsql-bugs"<pgsql-bugs(at)postgresql(dot)org>;
Subject: Re: [BUG] postgresql replaying WAL slowly when master drop a largenumber of relations in one transaction

On Wed, May 30, 2018 at 10:38:01AM +0800, 158306855 wrote:
> 3 But, the problem drop relation buffers by function
> DropRelFileNodesAllBuffers, that call by smgrdounlink. Each relation
> search the entire shared_buffer. This is unnecessary and can be
> optimized.

Yes, this is a known problem. Fujii Masao has written a patch which
will likely get committed in v12. Please see this thread:
https://www.postgresql.org/message-id/CAHGQGwHVQkdfDqtvGVkty+19cQakAydXn1etGND3X0PHbZ3+6w@mail.gmail.com
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Vik Fearing 2018-05-31 05:32:37 Re: BUG #15214: Pg 10.4 windows 64 bit installer is 32 bit
Previous Message Tom Lane 2018-05-30 18:14:24 Re: BUG: postgresql.auto.conf location