Catching resource leaks during WAL replay - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Catching resource leaks during WAL replay
Date
Msg-id 5153592E.20102@vmware.com
Whole thread Raw
Responses Re: Catching resource leaks during WAL replay  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
While looking at bug #7969, it occurred to me that it would be nice if
we could catch resource leaks in WAL redo routines better. It would be
useful during development, to catch bugs earlier, and it could've turned
that replay-stopping error into a warning.

For regular transactions, we use ResourceOwners to track buffer pins
(like in #7969) and other resources. There's no fundamental reason we
couldn't use one during replay. After running a redo routine, there
should be no buffer pins held or other resources held.

Lwlocks are not tracked by resource owners, but we could still easily
warn if any are held after the redo routine exits.

- Heikki

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: replace plugins directory with GUC
Next
From: Peter Eisentraut
Date:
Subject: Re: pkg-config files for libpq and ecpg