Re: relcache leak warnings vs. errors

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: relcache leak warnings vs. errors
Date: 2020-04-13 20:00:25
Message-ID: 20200413200025.3rnw7r5ssbsqntvv@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2020-04-11 10:54:49 -0400, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> > How about a compile-time option to turn all the warnings in resowner.c
> > into errors? This could be enabled automatically by --enable-cassert,
> > similar to other defines that that option enables.
>
> [ itch... ] Those calls occur post-commit; throwing an error there
> is really a mess, which is why it's only WARNING now.

> I guess you could make them PANICs, but it would be an option that nobody
> could possibly want to have enabled in anything resembling production.
> So I"m kind of -0.5 on making --enable-cassert do it automatically.
> Although I suppose that it's not really worse than other assertion
> failures.

I'd much rather see this throw an assertion than the current
behaviour. But I'm wondering if there's a chance we can throw an error
in non-assert builds without adding too much complexity to the error
paths. Could we perhaps throw the error a bit later during the commit
processing?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2020-04-13 20:10:20 Re: documenting the backup manifest file format
Previous Message Robert Haas 2020-04-13 19:51:14 Re: documenting the backup manifest file format