Re: pgsql: Assert that we don't invent relfilenodes or type OIDs in binary

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Assert that we don't invent relfilenodes or type OIDs in binary
Date: 2017-06-13 18:57:12
Message-ID: 20170613185712.GP13873@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Tue, Jun 13, 2017 at 11:52:04AM -0700, Andres Freund wrote:
> On 2017-06-13 13:45:12 -0400, Bruce Momjian wrote:
> > On Tue, Jun 13, 2017 at 01:39:34PM -0400, Tom Lane wrote:
> > > Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > > > Uh, is there a reason this is only an Assert(), meaning it only checks
> > > > in assert builds. pg_upgrade already has a lot of checks and they are
> > > > all fatal.
> > >
> > > Yeah, I didn't think it was worth adding overhead to production builds
> > > for it.
> >
> > Uh, you realize there are already many pg_upgrade sanity checks in the
> > backend that are not asserts, right?
>
> And? Not that it'll make a huge difference, but GetNewOidWithIndex() is
> a relatively hot-path in some workloads (e.g. with lots of toasted
> data), so it actually can make a difference. And for debugging asserts
> are often actually more useful, because you get a backtrace.
>
> I'm not sure what you're actually concerned about here?

I am concerned a non-assert build will not error out, but if no one else
is concerned about that, I am fine.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-06-13 19:10:16 Re: pgsql: Assert that we don't invent relfilenodes or type OIDs in binary
Previous Message Andres Freund 2017-06-13 18:52:04 Re: pgsql: Assert that we don't invent relfilenodes or type OIDs in binary