Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XcEN6-0002lE-98 for pgsql-sql@arkaria.postgresql.org; Thu, 09 Oct 2014 14:07:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XcEN5-0003H0-Oa for pgsql-sql@arkaria.postgresql.org; Thu, 09 Oct 2014 14:07:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XcEN4-0003Gh-NG for pgsql-sql@postgresql.org; Thu, 09 Oct 2014 14:07:10 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XcEMv-0006Fu-OF for pgsql-sql@postgresql.org; Thu, 09 Oct 2014 14:07:08 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XcEMu-0003T4-8r for pgsql-sql@postgresql.org; Thu, 09 Oct 2014 07:07:00 -0700 Date: Thu, 9 Oct 2014 07:07:00 -0700 (PDT) From: jim_yates To: pgsql-sql@postgresql.org Message-ID: <1412863620263-5822376.post@n5.nabble.com> In-Reply-To: <20141008205416.GZ7043@eldon.alvh.no-ip.org> References: <1412791213607-5822248.post@n5.nabble.com> <20141008185538.GY7043@eldon.alvh.no-ip.org> <1412797415000-5822268.post@n5.nabble.com> <20141008205416.GZ7043@eldon.alvh.no-ip.org> Subject: Re: could not access status of transaction pg_multixact issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Alvaro Herrera-9 wrote > jim_yates wrote: >=20 >> > A better way not involving mxid_age() would be to use pg_controldata to >> > extract the current value of the mxid counter, then subtract the >> current >> > relminmxid from that value. >>=20 >>=20 >> It's not clear which lines from pg_controldata to use for updating >> pg_database.datminmxid. >=20 > The one labelled NextMultiXactId. >=20 >> I also assume I would do the pg_database update on a idle database. >=20 > It doesn't matter, actually. pg_database is a shared catalog, so an > update would affect all the databases. >=20 > --=20 > =C3=81lvaro Herrera http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services I tried doing the update to pg_database on my Dev server and I can't get it to work. How do I calculate the new datminmxid value? NextMultiXactId: 30349 relminmxid from pg_class for the table: 8376 If I subtract the relminmxid from the nextmulixact I get 21793 which won't work. production-copy=3D# update pg_database set datminmxid=3D21973 where datname=3D'production-copy'; ERROR: column "datminmxid" is of type xid but expression is of type integer -- View this message in context: http://postgresql.1045698.n5.nabble.com/could= -not-access-status-of-transaction-pg-multixact-issue-tp5822248p5822376.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. --=20 Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql