Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTbT4-0004Z0-HM for pgsql-general@arkaria.postgresql.org; Thu, 14 Jun 2018 23:15:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fTbT3-0001Kd-2F for pgsql-general@arkaria.postgresql.org; Thu, 14 Jun 2018 23:15:49 +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 1fTbT2-0001K1-JN for pgsql-general@lists.postgresql.org; Thu, 14 Jun 2018 23:15:48 +0000 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fTbSz-0006G0-I0 for pgsql-general@postgresql.org; Thu, 14 Jun 2018 23:15:47 +0000 Received: by mail-qk0-x241.google.com with SMTP id d130-v6so4682308qkc.2 for ; Thu, 14 Jun 2018 16:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=K9673zXyxyRYGZSaBCJLeZWaTm89rRkeLyfQErWVjv0=; b=M63tjcaY5H79epYDxyVPKAbiTzmyXvjaXN2WD75c4AwzVm5WMsV7GjsHDTBwljV04x hW619732z4RHA9VrzQQJvkmWGl0hU+NdLqUddHYM2/C2Fj4WeBgAHZgy8bXUB6CFvkyu fGFb5Wrrnhz+JcQtAhou6tpcDyEqUhHOBAcVPvhxgNLv6eP8dXbjysxU6mbOVqthp84A Srke79VrTA7ijqKMVn1l8+P9xfJKniUu/LBJIWtyaUj22pRfEAsgxDST4KQ3g7p+9yhX ci9gBK4vjgsaW6gTwPuGAd0np7zhjz81uPp2I7F+LkgaqLGBNKH/wjqBz8QNJ3Rh68q1 zv7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=K9673zXyxyRYGZSaBCJLeZWaTm89rRkeLyfQErWVjv0=; b=KcP2TAAZGFQBRM9bMMbBAE9NJ/grCllUChojFk4sFFrg0L/2hyPu4+2CtPKj3daWnd dwDlkIvkZplb2fP9GT/G7h8lpe72K3a2DiquzfyzfMOlL+ve7ijvE9uTj4tL/OA4VnR2 T6TdCdv6bkrCN1tC81RFgOaT/PF/dVG4NhH4XnNbfrzMIt/kMXA4mNdPj94cVNYgJQyG 001KD/9MtMB/uERakt0vilreL+K1o0wd/b8BJNLBYox5NXx/qlL0lGBxDaPy4jJDevoa usYINttwdkCeti5jdVNVi0tR/a1SsPt3hQCm/+21twrpx4D+xRDeXMW6xud6/lSupkEX IaEQ== X-Gm-Message-State: APt69E3ta52hnwiy9K9ie+CHSowsL+z3Y+Y0eyrFiBcqUNGH8WSQT/no 1gD8wW4vdrxBNhfDG1PS4yEywQ== X-Google-Smtp-Source: ADUXVKK/V9qDJr1ndwQm7Nlwgb3NJ3wLcDRoYtlU8dch0MgaNMNdhtITzNsgQN5fRqqSFWw5RWzyFA== X-Received: by 2002:a37:e102:: with SMTP id c2-v6mr3877105qkm.18.1529018144549; Thu, 14 Jun 2018 16:15:44 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id z12-v6sm2935175qkf.66.2018.06.14.16.15.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Jun 2018 16:15:44 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 38B924FF; Thu, 14 Jun 2018 19:15:42 -0400 (-04) Date: Thu, 14 Jun 2018 19:15:42 -0400 From: Alvaro Herrera To: Daniel Lagerman Cc: pgsql-general@postgresql.org Subject: Re: Impact of multixact "members" limit exceeded Message-ID: <20180614231542.wowge4p5sdob4i4u@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Jun-14, Daniel Lagerman wrote: > > Set vacuum_multixact_freeze_table_age to 0 (causing all vacuums to scan > > tables fully) and vacuum_multixact_freeze_min_age to some value like one > > million (so that they remove most of the oldest multixacts, leaving > > just the frontmost one million). Then vacuum the tables with the > > highest multixact ages. Make sure the datminmxid advances in all > > databases (incl. postgres template0 template1); once it has advanced, > > the oldest member files are removed. Don't waste time processing tables > > with datminmxid higher than the minimum, as that won't free up any > > member space. > > Thanks, we opted to go with 1 million min and 100 million table age, the > tables in question are all way over that anyway. We completed vacuum on all > but two which are larger tables and I'm running Vacuum there right now > after I also bumped the maintenance work mem a bit. As this is 9.4 I can't > see the progress except that I noted that initialy it uses less CPU and > once it seems to finnaly start working it uses more CPU 10%->50% but that > is fine. So my hope is that the Vacuum completes over night. Did you observe whether the vacuumed tables' relminmxid advance? If it didn't, then those vacuums are a waste of time. Note that freeze_table_age affects when vacuum does a full table scan vs. when it skips pages due to visibility map. A vacuum that does a partial scan does *not* advance the relfrozenxid / relminmxid; only full-table scan vacuums can do that. (Except in 9.6.) If the relminmxid ages are younger than your 100 million table_age, vacuum won't do a full-table scan. Cheers -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services