Re: forcing a rebuild of the visibility map - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: forcing a rebuild of the visibility map
Date
Msg-id CAB7nPqQO2ye-GruUhqcEwfmTqfeN6fBNXymOQdAeLGSnp7_Qzw@mail.gmail.com
Whole thread Raw
In response to Re: forcing a rebuild of the visibility map  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: forcing a rebuild of the visibility map
List pgsql-hackers
On Sat, Jun 18, 2016 at 6:53 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Jun 17, 2016 at 2:59 PM, Robert Haas <robertmhaas@gmail.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



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Questionabl description in datatype.sgml
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14199: The pg_ctl status check on server start is not compatible with the silent_mode=on