Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOQMx-0005OR-98 for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Jun 2017 15:19:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dOQMw-0004lh-SJ for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Jun 2017 15:19:34 +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_2) (envelope-from ) id 1dOQLO-0001cA-1i for pgsql-hackers@postgresql.org; Fri, 23 Jun 2017 15:17:58 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dOQLG-00038S-8l for pgsql-hackers@postgresql.org; Fri, 23 Jun 2017 15:17:56 +0000 Received: by mail-lf0-x244.google.com with SMTP id f28so6887566lfi.3 for ; Fri, 23 Jun 2017 08:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=sAHzzHynOpmvbX1Q8F5cFdQXT3HNgeIsd2axFOIdANg=; b=OvyyJG1x6/gAT2DJr/BQrXQ4UTf+2GPZxuKA9vdIMNuicSUnqmMEWnSW7DrYarbWVa /YJ7MTO1X4djcUt8KygPHIyY+WwLaJqZQ7MWAwZGSxatZYsXZDhw3MemKDDYYsyUE5v/ O7HVBL0X7n82Mf27P2Sb/GhhoNAUwuhGv3Lk4EFs+u3oxAB50J1NVS267kc9phXo+iBv YuQ26OfbT4SAMdm5XXQ6ZlVyL7dlYvUiRgQivu1dRekH+FaSG+2eZSJaVPAbg/VaYZW1 6A4/Ggh5o3Gpou2cdyQ3+9yJFgxpZcwA8vJK/xQMWEK9c2gZONn3Ds69ApD5dgy3/bdY 6omA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=sAHzzHynOpmvbX1Q8F5cFdQXT3HNgeIsd2axFOIdANg=; b=IeJIczt5T+vGWyTpl9WEZ2rYlWkPHQ3c17fgXc9Rx0xgit8VrzMMR4VIy+5s+KJZGq ARl8rPJfXab3gbTWY/MGeUeMI4Q3RAsSOp0CRoQ3X2ocFTfEVMRsGbdlKYUv9vmyaiOL 1bl58KIvBznDsrhU4z0QuGoombWFJFORz3OUSvNqFZ7I+rXd/PvaWtev/oCcwyPtCTqa ROo9CMIfh6afVxLZ+Xawjg90LPTfEzmOOZ4ykqFe3Mezzdv8pR4aYTk0YcvSIi0aGfHZ HdTJ7B/5sSbA/r4+OMuLhoZKsm7GSqHr8ESqO168lJm4/6Qv/4SU3Owke+j1kgYIovs6 DGSQ== X-Gm-Message-State: AKS2vOzdYann6TaB45DuyY6fnuX9xE84Xvp+hsaG001+9aSV4dVGbT/R AXSH4IFcGbk/qQ== X-Received: by 10.46.82.68 with SMTP id g65mr2816709ljb.123.1498231069246; Fri, 23 Jun 2017 08:17:49 -0700 (PDT) Received: from seb.koffice.internal (koffice.avito.ru. [195.151.206.25]) by smtp.gmail.com with ESMTPSA id v28sm1122291ljd.17.2017.06.23.08.17.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2017 08:17:48 -0700 (PDT) From: Sergey Burladyan To: Bruce Momjian Cc: Amit Kapila , PostgreSQL-development , Dmitriy Sarafannikov , Vladimir Borodin Subject: Re: Broken hint bits (freeze) References: <20170619222113.GF3180@momjian.us> <20170620025919.GA28277@momjian.us> <20170620033726.GB28277@momjian.us> <87h8zb6kbx.fsf@seb.koffice.internal> <8760fq7pfe.fsf@seb.koffice.internal> <20170621163356.GB9358@momjian.us> Date: Fri, 23 Jun 2017 18:17:47 +0300 In-Reply-To: <20170621163356.GB9358@momjian.us> (Bruce Momjian's message of "Wed, 21 Jun 2017 12:33:56 -0400") Message-ID: <87lgoi68dg.fsf@seb.koffice.internal> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 Bruce Momjian writes: > On Wed, Jun 21, 2017 at 07:49:21PM +0530, Amit Kapila wrote: > > On Tue, Jun 20, 2017 at 7:24 PM, Amit Kapila wrote: > > > Hmm. I think we need something that works with lesser effort because > > > not all users will be as knowledgeable as you are, so if they make any > > > mistakes in copying the file manually, it can lead to problems. How > > > about issuing a notification (XLogArchiveNotifySeg) in shutdown > > > checkpoint if archiving is enabled? > > > > > > > I have thought more about the above solution and it seems risky to > > notify archiver for incomplete WAL segments (which will be possible in > > this case as there is no guarantee that Checkpoint record will fill > > the segment). So, it seems to me we should update the document unless > > you or someone has some solution to this problem. > As far as I know this is the only remaining open issue. Sergey, please > verify. I appreciate the work everyone has done to improve this, and > all the existing fixes have been pushed to all supported branches. :-) Yes, thank you all for your help! Yes, this is last issue with checkpoint that I know, how to ensure that standby sync all shared buffers into disk on it shutdown. I thinking about enforce restartpoint on shutdown, like: src/backend/access/transam/xlog.c - 8639 if (XLogRecPtrIsInvalid(lastCheckPointRecPtr) || - 8640 XLByteLE(lastCheckPoint.redo, ControlFile->checkPointCopy.redo)) - 8641 { + 8639 if ( !(flags & CHECKPOINT_IS_SHUTDOWN) && (XLogRecPtrIsInvalid(lastCheckPointRecPtr) || + 8640 XLByteLE(lastCheckPoint.redo, ControlFile->checkPointCopy.redo) ) + 8641 { But I still not read source and not sure about this solution. PS: I successfully upgraded last night from 9.2 to 9.4 and find other issue :-) It is about hash index and promote: 1. create master 2. create standby from it 3. create unlogged table and hash index like: create unlogged table test (id int primary key, v text); create index on test using hash (id); 3. stop master 4. promote standby now, if you try to upgrade this new promoted master pg_upgrade will stop on this hash index: error while creating link for relation "public.test_id_idx" ("s/9.2/base/16384/16393" to "m/9.4/base/16422/16393"): No such file or directory Failure, exiting I touch this file (s/9.2/base/16384/16393) and rerun pg_upgrade from scratch and it complete successfully. -- Sergey Burladyan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers