Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5168-0008Gt-3Q for pgsql-committers@arkaria.postgresql.org; Sun, 08 Apr 2018 03:34:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5165-0006Om-Ib for pgsql-committers@arkaria.postgresql.org; Sun, 08 Apr 2018 03:34:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5165-0006Oc-5x for pgsql-committers@lists.postgresql.org; Sun, 08 Apr 2018 03:34:29 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5161-00064w-Q4 for pgsql-committers@lists.postgresql.org; Sun, 08 Apr 2018 03:34:27 +0000 Received: from [192.168.127.1] (port=50893 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1f515y-0004oA-No; Sun, 08 Apr 2018 03:34:22 +0000 Received: from [127.0.0.1] (port=57465 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1f515y-0001p2-2L; Sun, 08 Apr 2018 03:34:22 +0000 From: Andrew Gierth To: David Rowley Cc: Alvaro Herrera , Tom Lane , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Support partition pruning at execution time In-Reply-To: (David Rowley's message of "Sun, 8 Apr 2018 15:21:18 +1200") Message-ID: <876052idlu.fsf@news-spur.riddles.org.uk> References: <20180408001509.lpxp42cszn45d6qc@alvherre.pgsql> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Sun, 08 Apr 2018 04:34:22 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "David" == David Rowley writes: >> Setting autovacuum_naptime to 10 seconds makes it occur in 10 second >> intervals... David> Ok, I thought it might have been some concurrent vacuum on the David> table but the only tables I see being vacuumed are system David> tables. It's not vacuum that tends to be the problem, but analyze (on any table). Lazy-vacuum's snapshots are mostly ignored for computing global xmin horizons by other vacuums, but analyze's snapshots are not. David> I tried performing a manual vacuum of each of these and could David> not get it to trigger, but then I did: David> select * from pg_class; David> from another session and then the script starts spitting out David> some errors. Obviously, because the select holds a snapshot and therefore also holds back OldestXmin. You can't ever assume that data you just inserted will become all-visible just because you just vacuumed the table, unless you know that there is NO concurrent activity that might have a snapshot (and no other possible reason why OldestXmin might be older than your insert). -- Andrew (irc:RhodiumToad)