pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christoph Berg <myon@debian.org>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Bus error in pg_logical_slot_get_changes (9.4.7, sparc)
Date: Thu, 14 Apr 2016 15:22:42 -0700
Message-ID: <20160414222242.ec4m74aqsh4eshde@alap3.anarazel.de> (raw)
In-Reply-To: <15040.1460661277@sss.pgh.pa.us>
References: <20160413211152.GA21711@msg.credativ.de>
	<20160413175827.dmlbtdf7c3mgmnex@alap3.anarazel.de>
	<20160414092919.GA11804@msg.df7cb.de>
	<20160414112518.GE11804@msg.df7cb.de>
	<423.1460653903@sss.pgh.pa.us>
	<20160414183602.GA22486@msg.df7cb.de>
	<15040.1460661277@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2016-04-14 15:14:37 -0400, Tom Lane wrote:
> I've been looking around and testing some more.  I noticed that the only
> caller of ReorderBufferRestoreChange always passes a maxaligned buffer,
> so most of the changes I suggested are unnecessary.  AFAICT, it's only
> the second fetch of t_len that is at any risk.

I think so too. And I agree that a comment about this would have been
rather helpful...


> Even there, at least in
> HEAD, I cannot construct a test case in which the first tuple's t_len is
> not a multiple of 4.

That's really kinda weird.  It's a tuple from WAL, and the length's from
the record; the same way wal replay gets it.  Wonder if this might not
indicate a relevant bug somewhere...


> I have a suspicion that
> something in the impenetrable thicket that passes for prefix/suffix
> optimization in log_heap_update is forcing the WAL-logged tuple length to
> be rounded off to sizeof(int) (*not* MAXALIGN).

I don't think so, because the prefix optimization is essentially
disabled for logical...



> So I now think my previous patch is overkill, and we should instead use
> something like the attached.

Looks good to me. Thanks!

- Andres


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (15+ messages)  latest in thread

Message-ID: <20160414222242.ec4m74aqsh4eshde@alap3.anarazel.de>
Permalink:  ../20160414222242.ec4m74aqsh4eshde@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20160414222242.ec4m74aqsh4eshde@alap3.anarazel.de

 · 

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 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, tgl@sss.pgh.pa.us, myon@debian.org
  Subject: Re: Bus error in pg_logical_slot_get_changes (9.4.7, sparc)
  In-Reply-To: <20160414222242.ec4m74aqsh4eshde@alap3.anarazel.de>
  References: <20160413211152.GA21711@msg.credativ.de> <20160413175827.dmlbtdf7c3mgmnex@alap3.anarazel.de> <20160414092919.GA11804@msg.df7cb.de> <20160414112518.GE11804@msg.df7cb.de> <423.1460653903@sss.pgh.pa.us> <20160414183602.GA22486@msg.df7cb.de> <15040.1460661277@sss.pgh.pa.us> <20160414222242.ec4m74aqsh4eshde@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