Re: dsm_unpin_segment

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dsm_unpin_segment
Date: 2016-08-20 12:43:10
Message-ID: CA+TgmoauY7CSXaNngQ22ZdsqaUkM1eWvqRu6KTmDStHKtQ7RZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 20, 2016 at 7:37 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> 2.
> + if (dsm_control->item[seg->control_slot].pinned)
> + elog(ERROR, "cannot pin a segment that is already pinned");
>
> Shouldn't this be a user facing error (which means we should use ereport)?

Uh, certainly not. This can't happen because of SQL the user enters;
it can only happen because of a C coding error. elog() is the
appropriate tool for that case.

--
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 Craig Ringer 2016-08-20 12:59:46 Re: Logical decoding restart problems
Previous Message Robert Haas 2016-08-20 12:42:12 Re: Improving planner's checks for parallel-unsafety