Re: [PATCH] Assert that the correct locks are held when calling PageGetLSN()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jacob Champion <pchampion(at)pivotal(dot)io>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Assert that the correct locks are held when calling PageGetLSN()
Date: 2017-09-01 16:12:13
Message-ID: CA+TgmoY_bi0cLCgM-nxz7CzMRYhb8Y2ZJYDCWL+Z77e-iFxQDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 31, 2017 at 2:53 PM, Jacob Champion <pchampion(at)pivotal(dot)io> wrote:
> While working on checksum support for GPDB, we noticed that several
> callers of PageGetLSN() didn't follow the correct locking procedure.
> To try to help ferret out present and future mistakes, we added an
> assertion to PageGetLSN() that checks whether those locks were being
> held correctly. This patch is a first-draft attempt to port that
> assertion back up to postgres master, based on work by Asim Praveen,
> Ashwin Agrawal, and myself.
>
> The patch is really two pieces: add the assertion, and fix the callers
> that would trip it. The latter part is still in progress, because I'm
> running into some places where I'm not sure what the correct way
> forward is.
>
> (I'm a newbie to this list and this code base, so please don't
> hesitate to correct me on anything, whether that's code- or
> culture-related!)

It's a good idea to add patches to commitfest.postgresql.org

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2017-09-01 16:22:20 Re: log_destination=file
Previous Message Robert Haas 2017-09-01 16:09:35 Re: GnuTLS support