Re: mdnblocks() sabotages error checking in _mdfd_getseg()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: mdnblocks() sabotages error checking in _mdfd_getseg()
Date: 2015-12-09 21:54:32
Message-ID: 11176.1449698072@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stas Kelvich 2015-12-09 22:10:34 Re: Speedup twophase transactions
Previous Message Peter Geoghegan 2015-12-09 21:51:33 Re: Redundant sentence within INSERT documentation page (exclusion constraints)