Re: mdnblocks() sabotages error checking in _mdfd_getseg() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: mdnblocks() sabotages error checking in _mdfd_getseg()
Date
Msg-id 11176.1449698072@sss.pgh.pa.us
Whole thread Raw
In response to mdnblocks() sabotages error checking in _mdfd_getseg()  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: mdnblocks() sabotages error checking in _mdfd_getseg()  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> The comment in mdnblocks.c says this:

>                          * Because we pass O_CREAT, we will create the
> next segment (with
>                          * zero length) immediately, if the last
> segment is of length
>                          * RELSEG_SIZE.  While perhaps not strictly
> necessary, this keeps
>                          * the logic simple.

> I don't really see how this "keeps the logic simple".

My (vague) recollection is that this is defending some assumptions
elsewhere in md.c.  You sure you haven't broken anything with this?
Relation extension across a segment boundary, perhaps?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Redundant sentence within INSERT documentation page (exclusion constraints)
Next
From: Stas Kelvich
Date:
Subject: Re: Speedup twophase transactions