Re: pg_shmem_allocations view

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pg_shmem_allocations view
Дата
Msg-id 20140506115641.GO17909@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: pg_shmem_allocations view  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: pg_shmem_allocations view
Список pgsql-hackers
On 2014-05-05 23:20:43 -0400, Robert Haas wrote:
> On Mon, May 5, 2014 at 6:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > I'm not confident that it'll be useful either.  But I am confident that
> > if we don't put it in now, and decide we want it later, there will be
> > complaints when we change the API.  Better to have an ignored parameter
> > than no parameter.
> 
> I'm generally skeptical of that philosophy.  If we put in an ignored
> parameter, people may pass pointers to NULL or to garbage or to an
> overly-long string, and they won't know it's broken until we make it
> do something; at which point their code will begin to fail without
> warning.

If it were a complex change, maybe. But I don't think that's likely
here.
Assert(name != NULL && strlen(name) > 0 && strlen(name) < NAMEDATALEN);
should perfectly do the trick.

> If we're going to do anything at all here for 9.4, I recommend
> ignoring the fact we're in feature freeze and going whole hog: add the
> name, add the monitoring view, and add the monitoring view for the
> main shared memory segment just for good measure.

We can do that as well. If there's agreement on that path I'll update
the patch to also show dynamic statements.

> Anyone who expects PostgreSQL's C API to be
> completely stable is going to be regularly disappointed, as most
> recently demonstrated by the Enormous Header Churn of the 9.3 era.  I
> don't particularly mind being the cause of further disappointment; as
> long as the breakage is obvious rather than subtle, the fix usually
> takes about 10 minutes.

Didn't you complain rather loudly about that change?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: pg_shmem_allocations view
Следующее
От: Robert Haas
Дата:
Сообщение: Re: pg_shmem_allocations view