pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Need Multixact Freezing Docs
Date: Wed, 16 Apr 2014 13:39:42 -0700
Message-ID: <534EEA8E.5070407@agliodbs.com> (raw)
In-Reply-To: <WM!fa9379a39fd015511ce3872138589081b6e688c26b67a6801364b609b26642096bfd329ce2cb7eb090da00879e59e525!@asav-3.01.com>
References: <534DA3D1.2010000@agliodbs.com>
	<WM!e71c36af513bace4ff046f7349231f370d2b74c4adee803b2eb3ed330aada82b5badd712b47f9556d3fa55d2ab73a3e0!@asav-3.01.com>
	<534DB22A.2040909@agliodbs.com>
	<20140416133233.GL5822@eldon.alvh.no-ip.org>
	<WM!a70b2681d2ac0ed55eb2d3eed44e6730e9c71b5fad8c5320503fde8b18a03fd98a6af6244821ca39d47c1d9e758c45ff!@asav-2.01.com>
	<534EC69B.9010107@agliodbs.com>
	<20140416203057.GQ5822@eldon.alvh.no-ip.org>
	<WM!fa9379a39fd015511ce3872138589081b6e688c26b67a6801364b609b26642096bfd329ce2cb7eb090da00879e59e525!@asav-3.01.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 04/16/2014 01:30 PM, Alvaro Herrera wrote:
> Josh Berkus wrote:
>>
>>> You can see the current multixact value in pg_controldata output.  Keep
>>> timestamped values of that somewhere (a table?) so that you can measure
>>> consumption rate.  I don't think we provide SQL-level access to those
>>> values.
>>
>> Bleh.  Do we provide SQL-level access in 9.4?  If not, I think that's a
>> requirement before release.
> 
> Yeah, good idea.  Want to propose a patch?

Yeah, lemme dig into this.  I really think we need it for 9.4, feature
frozen or not.

>>>> Also: how do I check the multixact age of a table?  There doesn't seem
>>>> to be any data for this ...
>>>
>>> pg_class.relminmxid is the oldest multixact value that might be present
>>> in a table.
>>
>> On every database I've tested, age(relminmxid) returns int_max.  So this
>> is apparently broken.
> 
> Hmm, are you sure it's INT_MAX and not 4244967297?  Heikki reported
> that: http://www.postgresql.org/message-id/52401AEA.9000608@vmware.com
> The absolute value is not important; I think that's mostly harmless.  I
> don't think applying age() to a multixact value is meaningful, though;
> that's only good for Xids.

Yeah, I'm sure:


josh=# select relname, age(relminmxid) from pg_class;
                 relname                 |    age
-----------------------------------------+------------
 pg_statistic                            | 2147483647
 pg_type                                 | 2147483647
 random                                  | 2147483647
 dblink_pkey_results                     | 2147483647
 pg_toast_17395                          | 2147483647

...

So if age() doesn't mean anything, then how are users to know when the
need to freeze?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (18+ messages)  latest in thread

Message-ID: <534EEA8E.5070407@agliodbs.com>
Permalink:  ../534EEA8E.5070407@agliodbs.com/
Also on:    postgresql.org/message-id/534EEA8E.5070407@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: josh@agliodbs.com
  Subject: Re: Need Multixact Freezing Docs
  In-Reply-To: <534EEA8E.5070407@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox