pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergey Burladyan <eshkinkot@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Dmitriy Sarafannikov <dsarafannikov@yandex.ru>
Cc: Vladimir Borodin <root@simply.name>
Subject: Re: Broken hint bits (freeze)
Date: Fri, 23 Jun 2017 18:17:47 +0300
Message-ID: <87lgoi68dg.fsf@seb.koffice.internal> (raw)
In-Reply-To: <20170621163356.GB9358@momjian.us>
References: <CAA4eK1KMxzg_q2-0rMRh22EMWGutQ0QbCtMqc_5GeuNVyJ8kmA@mail.gmail.com>
	<20170619222113.GF3180@momjian.us>
	<CAJ2ymdg=0knii-bavVLpKEGc9DanaZC+UXjnipx_n-gFvOkdcg@mail.gmail.com>
	<20170620025919.GA28277@momjian.us>
	<20170620033726.GB28277@momjian.us>
	<87h8zb6kbx.fsf@seb.koffice.internal>
	<CAA4eK1JmEAj9qUMbS-=u7b4Boqsr3mAoadevT9LDWm4JgxamBg@mail.gmail.com>
	<8760fq7pfe.fsf@seb.koffice.internal>
	<CAA4eK1JxV1+UTyU3T2WM6rhiDEZy6zk3cx+Y3TaXCXAwQxcU1Q@mail.gmail.com>
	<CAA4eK1+o6ErVAh484VtE91wow1-uOysohSvb0TS52Ei76PzOKg@mail.gmail.com>
	<20170621163356.GB9358@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Bruce Momjian <bruce@momjian.us> 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 <amit.kapila16@gmail.com> 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



view thread (64+ messages)  latest in thread

Message-ID: <87lgoi68dg.fsf@seb.koffice.internal>
Permalink:  ../87lgoi68dg.fsf@seb.koffice.internal/
Also on:    postgresql.org/message-id/87lgoi68dg.fsf@seb.koffice.internal

 · 

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: eshkinkot@gmail.com, bruce@momjian.us, amit.kapila16@gmail.com, dsarafannikov@yandex.ru, root@simply.name
  Subject: Re: Broken hint bits (freeze)
  In-Reply-To: <87lgoi68dg.fsf@seb.koffice.internal>

* 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