Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-20 Thread Robert Haas
On Mon, Jun 20, 2016 at 4:57 PM, Tom Lane wrote: > Andres Freund writes: >> I also don't see why it's a good idea to have knowledge about how to >> truncate the visibility map outside of visibilitymap.c. Having that in a >> contrib module just seems like a modularity violation. > > That seems lik

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-20 Thread Tom Lane
Andres Freund writes: > I also don't see why it's a good idea to have knowledge about how to > truncate the visibility map outside of visibilitymap.c. Having that in a > contrib module just seems like a modularity violation. That seems like a pretty good argument. regards

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-20 Thread Andres Freund
On 2016-06-18 11:56:51 -0400, Tom Lane wrote: > Michael Paquier writes: > > On Sat, Jun 18, 2016 at 6:53 AM, Robert Haas wrote: > >> 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 templ

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-18 Thread Tom Lane
Michael Paquier writes: > On Sat, Jun 18, 2016 at 6:53 AM, Robert Haas wrote: >> 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 u

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-18 Thread Michael Paquier
On Sat, Jun 18, 2016 at 6:53 AM, Robert Haas wrote: > On Fri, Jun 17, 2016 at 2:59 PM, Robert Haas 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

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-17 Thread Robert Haas
Since time is short and it seems better to get the xlog page magic bump done before beta2, I've gone ahead and committed this, but there are two points here that seem to warrant some input from other senior hackers. Andres and I have discussed these points off list but without reaching a meeting o

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-17 Thread Robert Haas
On Fri, Jun 17, 2016 at 2:48 PM, Andres Freund wrote: >> From 010e99b403ec733d50c71a7d4ef646b1b446ef07 Mon Sep 17 00:00:00 2001 >> From: Robert Haas >> Date: Wed, 15 Jun 2016 22:52:58 -0400 >> Subject: [PATCH 2/2] Add VACUUM (DISABLE_PAGE_SKIPPING) for emergencies. > >>Furthermore, >> +

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-17 Thread Andres Freund
Hi, On 2016-06-15 23:06:37 -0400, Robert Haas wrote: > After having been scared out of my mind by the discovery of > longstanding breakage in heap_update[1], it occurred to me that this > is an excellent example of a case in which the option for which Andres > was agitating - specifically forcing

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-16 Thread Masahiko Sawada
On Thu, Jun 16, 2016 at 10:03 PM, Robert Haas wrote: > On Thu, Jun 16, 2016 at 2:33 AM, Masahiko Sawada > wrote: >> Option name DISABLE_PAGE_SKIPPING is good to me. >> I'm still working on this, but here are some review comments. >> >> --- >> +CREATE FUNCTION pg_truncate_visibility_map(regclass)

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-16 Thread Robert Haas
On Thu, Jun 16, 2016 at 2:33 AM, Masahiko Sawada wrote: > Option name DISABLE_PAGE_SKIPPING is good to me. > I'm still working on this, but here are some review comments. > > --- > +CREATE FUNCTION pg_truncate_visibility_map(regclass) > +RETURNS void > +AS 'MODULE_PATHNAME', 'pg_truncate_visibilit

Re: [HACKERS] forcing a rebuild of the visibility map

2016-06-15 Thread Masahiko Sawada
On Thu, Jun 16, 2016 at 12:06 PM, Robert Haas wrote: > [ Changing subject line in the hopes of keeping separate issues in > separate threads. ] > > On Mon, Jun 6, 2016 at 11:00 AM, Tom Lane wrote: >> Robert Haas writes: >>> I'm intuitively sympathetic to the idea that we should have an option >>

[HACKERS] forcing a rebuild of the visibility map

2016-06-15 Thread Robert Haas
[ Changing subject line in the hopes of keeping separate issues in separate threads. ] On Mon, Jun 6, 2016 at 11:00 AM, Tom Lane wrote: > Robert Haas writes: >> I'm intuitively sympathetic to the idea that we should have an option >> for this, but I can't figure out in what case we'd actually te