Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a6m1B-0004CB-1I for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2015 21:11:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a6m1A-0004wI-Js for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2015 21:11:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a6m19-0004vH-Eo; Wed, 09 Dec 2015 21:11:19 +0000 Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a6m15-0004fk-Mu; Wed, 09 Dec 2015 21:11:18 +0000 Received: by lbpu9 with SMTP id u9so37863227lbp.2; Wed, 09 Dec 2015 13:11:15 -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=jJMdR4ITKOvnoXi/pfIcQ4dF1fJXG+yt+p+FdilQfvw=; b=o7nBD6zy+z4bfEnBZZ/Lpsactz6mcKK6KwNIjpLtiHXcEI3sCA7qRL+GJDmLPqzH4w lZZlJpRmN/Fdt6tb6yYnIOU71u1yo80hvAvMAtOiDDNYLSWBOQnKAlVcvQ13HQ3v7oHh G1NjiT/I0YDV7htBFk5knlaPwhp0ysfIp5MMdsLJBmp6ZK5IbdVDQ4HmWVNYXj0OGzRc a6SS1m6sIB/IN/r1Sgwb6SY54ZXPVzonxzk85yFPNrGyubU/B7uzNI58rN/LpMhP64k6 IqioDsxUNAUmqHG0HEkEzlWJW9BDQpXeLmKswk7J0tS+mtgLUawW0yL9tbMxnKe7Uc/g vdNA== MIME-Version: 1.0 X-Received: by 10.112.142.98 with SMTP id rv2mr3581571lbb.72.1449695474997; Wed, 09 Dec 2015 13:11:14 -0800 (PST) Received: by 10.112.73.74 with HTTP; Wed, 9 Dec 2015 13:11:14 -0800 (PST) In-Reply-To: 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: Wed, 9 Dec 2015 16:11:14 -0500 Message-ID: Subject: Re: [DOCS] max_worker_processes on the standby From: Robert Haas To: Fujii Masao Cc: Alvaro Herrera , 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-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Mon, Dec 7, 2015 at 8:33 AM, Fujii Masao wrote: > 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? It seems like these changes haven't been pushed yet, and unfortunately that's probably a beta blocker. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers