Re: forcing a rebuild of the visibility map

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: forcing a rebuild of the visibility map
Date: 2016-06-18 12:08:52
Message-ID: CAB7nPqQO2ye-GruUhqcEwfmTqfeN6fBNXymOQdAeLGSnp7_Qzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 18, 2016 at 6:53 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Jun 17, 2016 at 2:59 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> Having an XLogInsert() in contrib makes me more than a bit squeamish. I
>>> think it'd be fair bit better to have that section of code in
>>> visibilitymap.c, and then call that from the extension.
>>
>> I thought about that too, but it seemed like it was just bloating the
>> core server for no real reason. It's not like contrib is off in space
>> someplace.
>
> So, Andres thinks it's a bad idea to have an XLogInsert() call in
> contrib, and I don't think it matters. Anyone else have an opinion?

I am meh as well with this practice that we should not encourage. xlog
insertion routines should just be generated by in-core code. We have
now the generic WAL interface for extensions, and if need be it should
be extended.

> Andres, do you want to explain the nature of your concern further?

I am not in his mind, but my guess is that contrib modules are
sometimes used as template examples by other people, and encouraging
users to use those routines in modules would increase the risk to
misuse them, aka badly-formed records that could corrupt the system.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-06-18 15:51:10 Re: [BUGS] BUG #14199: The pg_ctl status check on server start is not compatible with the silent_mode=on
Previous Message Tatsuo Ishii 2016-06-18 12:04:17 Questionabl description in datatype.sgml