Re: buffer assertion tripping under repeat pgbench load

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Satoshi Nagayasu <snaga(at)uptime(dot)jp>
Subject: Re: buffer assertion tripping under repeat pgbench load
Date: 2013-03-03 23:27:04
Message-ID: 5133DC48.3050002@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/27/13 2:32 AM, Satoshi Nagayasu wrote:

> This patch is intended to improve warning message at
> AtEOXact_Buffers(), but I guess another function,
> AtProcExit_Buffers(), needs to be modified as well. Right?

Yes, good catch. I've attached an updated patch that does the same sort
of modification to that one too.

> Then, I need some suggestion from hackers to continue this review.
> How should I reproduce this message for review?
> This is a debug warning message, so it's not easy for me
> to reproduce this message.

What I was doing to test the code out is alter this check:

if (PrivateRefCount[i - 1] != 0)

To have the opposite logic:

if (PrivateRefCount[i - 1] = 0)

Then the patch fires on every buffer, all the time. You can still tell
which are the real errors should you happen to get one, because the log
entry shows the count. If it's 0, you know that's just a debugging message.

To keep the output from a test like that from being completely
overwhelming, I also set:

shared_buffers = 16

Which is its minimum value.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com

Attachment Content-Type Size
show-private-leak-errors-v2.patch text/plain 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-03-03 23:39:08 Re: Materialized views WIP patch
Previous Message Josh Berkus 2013-03-03 23:15:47 Re: transforms