From: Andres Freund <andres@anarazel.de>
To: Thom Brown <thom@linux.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Abhijit Menon-Sen <ams@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions
Date: Fri, 29 Apr 2016 16:58:37 -0700
Message-ID: <20160429235837.b63wkjw4dduf56wt@alap3.anarazel.de> (raw)
In-Reply-To: <CAA-aLv72QazLvPdKZYpVn4a_Eh+i4_cxuB03k+iCuZM_xjc+6Q@mail.gmail.com>
References: <CA+TgmoZj=eA5g0+6nFxPjhfDzCEaHJM_vf00krD0LqKC3jkqGw@mail.gmail.com>
<CA+TgmobW=RrpTHo6ghH33bvhJL78zSudf_3c1dub48sSpswx5g@mail.gmail.com>
<20160425155627.e4yk72bm2naisesz@alap3.anarazel.de>
<CA+TgmobyCtD4xRY4Ee2Jv6-qznMDaLVrMshuirXbdPNjaYVQGA@mail.gmail.com>
<20160425180521.2g6o4tgpkc3jneyj@alap3.anarazel.de>
<CA+TgmobdydzhyzsF1gFNu9P=b_uADoM3R-BFGFuF-+heT9OaJw@mail.gmail.com>
<20160425205720.i2ldnkwj6a2ldz7g@alap3.anarazel.de>
<CA+Tgmob97m0GniMp82bGkzdZBuLbJWBy2uUbJMtDpAHbm8CRVQ@mail.gmail.com>
<20160426213207.j3xi2amneejm3ed6@alap3.anarazel.de>
<CAA-aLv72QazLvPdKZYpVn4a_Eh+i4_cxuB03k+iCuZM_xjc+6Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2016-04-28 17:41:29 +0100, Thom Brown wrote:
> I've noticed another breakage, which I can reproduce consistently.
> 2016-04-28 17:36:08 BST [18108]: [47-1] user=,db=,client= DEBUG: could not
> fsync file "base/24581/24594.1" but retrying: No such file or directory
> 2016-04-28 17:36:08 BST [18108]: [48-1] user=,db=,client= ERROR: could not
> fsync file "base/24581/24594.1": No such file or directory
> 2016-04-28 17:36:08 BST [18605]: [17-1]
> user=thom,db=postgres,client=[local] ERROR: checkpoint request failed
> 2016-04-28 17:36:08 BST [18605]: [18-1]
> user=thom,db=postgres,client=[local] HINT: Consult recent messages in the
> server log for details.
Yuck. md.c is so crummy :(
Basically the reason for the problem is that mdsync() needs to access
"formally non-existant segments" (as in ones where previous segments are
< RELSEG_SIZE), because we queue (and the might be preexistant) fsync
requests via register_dirty_segment() in mdtruncate().
I'm a bit of a loss of how to reconcile that view with the original
issue in this thread. The best I can come up with this moment is doing
a _mdfd_openseg() in mdsync() to open the truncated segment if
_mdfd_getseg() returned NULL. We don't want to normally use that in
either function because it'll imply a separate open() etc, which is
pretty expensive - but doing in the fallback case would be kind of ok.
Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, thom@linux.com, robertmhaas@gmail.com, ams@2ndquadrant.com, michael.paquier@gmail.com, kommi.haribabu@gmail.com, coelho@cri.ensmp.fr, pgsql-hackers@postgresql.org
Subject: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions
In-Reply-To: <20160429235837.b63wkjw4dduf56wt@alap3.anarazel.de>
References: <CA+TgmoZj=eA5g0+6nFxPjhfDzCEaHJM_vf00krD0LqKC3jkqGw@mail.gmail.com> <CA+TgmobW=RrpTHo6ghH33bvhJL78zSudf_3c1dub48sSpswx5g@mail.gmail.com> <20160425155627.e4yk72bm2naisesz@alap3.anarazel.de> <CA+TgmobyCtD4xRY4Ee2Jv6-qznMDaLVrMshuirXbdPNjaYVQGA@mail.gmail.com> <20160425180521.2g6o4tgpkc3jneyj@alap3.anarazel.de> <CA+TgmobdydzhyzsF1gFNu9P=b_uADoM3R-BFGFuF-+heT9OaJw@mail.gmail.com> <20160425205720.i2ldnkwj6a2ldz7g@alap3.anarazel.de> <CA+Tgmob97m0GniMp82bGkzdZBuLbJWBy2uUbJMtDpAHbm8CRVQ@mail.gmail.com> <20160426213207.j3xi2amneejm3ed6@alap3.anarazel.de> <CAA-aLv72QazLvPdKZYpVn4a_Eh+i4_cxuB03k+iCuZM_xjc+6Q@mail.gmail.com> <20160429235837.b63wkjw4dduf56wt@alap3.anarazel.de>
* 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