Re: BUG #14378: when drop schema, standby will do many more than primary, and very slow, it's a bug?

From: 德哥 <digoal(at)126(dot)com>
To: "Andres Freund" <andres(at)anarazel(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14378: when drop schema, standby will do many more than primary, and very slow, it's a bug?
Date: 2016-10-19 01:47:18
Message-ID: 67dc2404.2646.157da9f094f.Coremail.digoal@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

HI,
Add some info when i use perf top.

1\. when drop schema on primary (search depend)
```
findDependentObjects /home/digoal/pgsql9.6/bin/postgres
3745.00 11.3% get_tabstat_entry /home/digoal/pgsql9.6/bin/postgres
```

2\. when drop schema start (drop files)
```
5862.00 17.7% DropRelFileNodesAllBuffers /home/digoal/pgsql9.6/bin/postgres
4058.00 12.2% smgrclose /home/digoal/pgsql9.6/bin/postgres
```

3\. when apply on standby
```
12464.00 92.5% DropRelFileNodesAllBuffers /home/digoal/pgsql9.6/bin/postgres
56.00 0.6% DropRelFileNodeBuffers /home/digoal/pgsql9.6/bin/postgres
```

best regards.

--
公益是一辈子的事,I'm Digoal,Just Do It.

At 2016-10-19 02:32:08, "Andres Freund" <andres(at)anarazel(dot)de> wrote:
>On 2016-10-18 07:57:33 +0000, digoal(at)126(dot)com wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference: 14378
>> Logged by: Zhou Digoal
>> Email address: digoal(at)126(dot)com
>> PostgreSQL version: 9.6.0
>> Operating system: CentOS 6.x x64
>> Description:
>>
>>
>>
>> when i use postgresql 9.6.0 for primary-standby, i drop a schema on primary,
>> but it's apply very slow on standby.
>>
>> the wal send very fast, but apply very slow, i think the syscall more than
>> it on primary?
>>
>> this is my test:
>
>There's some O(n^2) behaviour around lock release and acquire during
>replay IIRC. See for example the thread around
>http://archives.postgresql.org/message-id/20140630231741.GA30918%40alap3.anarazel.de
>
>It's not entirely trivial to fix that though. E.g. the patch of Simon's
>later in that thread wouldn't help in your situation.
>
>Greetings,
>
>Andres Freund

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-10-19 03:56:59 Re: BUG #14380: pg_config fails to build.
Previous Message 德哥 2016-10-19 01:22:43 Re: BUG #14378: when drop schema, standby will do many more than primary, and very slow, it's a bug?