Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a5vvJ-0002ea-HO for pgsql-docs@arkaria.postgresql.org; Mon, 07 Dec 2015 13:33:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a5vvI-0001X6-VU for pgsql-docs@arkaria.postgresql.org; Mon, 07 Dec 2015 13:33: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.84) (envelope-from ) id 1a5vvH-0001Vg-Gs; Mon, 07 Dec 2015 13:33:47 +0000 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a5vvE-0008Cn-IL; Mon, 07 Dec 2015 13:33:46 +0000 Received: by qgec40 with SMTP id c40so142827604qge.2; Mon, 07 Dec 2015 05:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2oaEJFFCjOYrTv65hFoSb/OatCiUkNV2gokOpKGIKmw=; b=J/dr7RssNL62acfpj3X3Tl0SGum9i+/eXN6MS71hg/sGe4fwb8rz6VIBPTSqY/xSGJ lzwClAu+pj8yh4cQsvPx+5fCNZzjRlm2VSyPSPYILKil2hOv4xJJD3nXqu7erDVAGsac lS7lIW259eLbqW2xFBypicUwoa3GiJ6YxX9Bxagq99UoTOphE10sInG65a1cXpO+kD0F Ef+Ha4o5fTVXaDP0F8eApmw5GUeAa2w+RJE2d9VA0GMIdLHK8UosIcPNbvLFc7NCh05G sdcvAmRgigvBCCv/DXMTef8M4w1Xga6/RDylSjFaOm/778Psvb9uRsZAAxGhQsWPfWzB 7CTw== MIME-Version: 1.0 X-Received: by 10.140.101.233 with SMTP id u96mr36229604qge.70.1449495223338; Mon, 07 Dec 2015 05:33:43 -0800 (PST) Received: by 10.55.170.142 with HTTP; Mon, 7 Dec 2015 05:33:43 -0800 (PST) In-Reply-To: <20151204155616.GV2763@alvherre.pgsql> References: <20151002185941.GE2573@alvherre.pgsql> <5622BF9D.2010409@2ndquadrant.com> <20151020190522.GT3391@alvherre.pgsql> <20151027180759.GG240637@alvherre.pgsql> <20151116214338.GD614468@alvherre.pgsql> <20151204155616.GV2763@alvherre.pgsql> Date: Mon, 7 Dec 2015 22:33:43 +0900 Message-ID: Subject: Re: [HACKERS] max_worker_processes on the standby From: Fujii Masao To: Alvaro Herrera Cc: Robert Haas , Petr Jelinek , oonishitk@nttdata.co.jp, pgsql-docs , PostgreSQL-development Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On Sat, Dec 5, 2015 at 12:56 AM, Alvaro Herrera wrote: > Fujii Masao wrote: > >> Sorry for not reviewing the patch before you push it... >> >> In HEAD, I ran very simple test case: >> >> 1. enable track_commit_timestamp >> 2. start the server >> 3. run some transactions >> 4. execute pg_last_committed_xact() -- returns non-null values >> 5. shutdown the server with immdiate mode >> 6. restart the server -- crash recovery happens >> 7. execute pg_last_committed_xact() >> >> The last call of pg_last_committed_xact() returns NULL values, which means >> that the xid and timestamp information of the last committed transaction >> disappeared by crash recovery. Isn't this a bug? > > Hm, not really, because the status of the "last" transaction is kept in > shared memory as a cache and not expected to live across a restart. > However, I tested the equivalent scenario: > > alvherre=# create table fg(); > CREATE TABLE > > alvherre=# select ts.* from pg_class,pg_xact_commit_timestamp(xmin) ts where relname = 'fg'; > ts > ------------------------------- > 2015-12-04 12:41:48.017976-03 > (1 fila) > > then crash the server, and after recovery the data is gone: > > alvherre=# select ts.*, xmin, c.relname from pg_class c,pg_xact_commit_timestamp(xmin) ts where relname = 'fg'; > ts | xmin | relname > ----+------+--------- > | 630 | fg > (1 fila) > > Not sure what is going on; my reading of the code certainly says that > the data should be there. I'm looking into it. > > I also noticed that I didn't actually push the whole of the patch > yesterday -- I neglected to "git add" the latest changes, the ones that > fix the promotion scenario :-( so the commit messages is misleading > because it describes something that's not there. So firstly you will push those "latest" changes soon? Regards, -- Fujii Masao -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs