pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: anderson <anderson2013@qq.com>
To: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: [BUG] pg9.4.10 Logical decoding did not get the correct oldtuplelen
Date: Tue, 27 Dec 2016 11:30:47 +0800
Message-ID: <tencent_5B4204547B0BB8C05F9B1D99@qq.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

hi team:

I found a postgresql 9.4.10 Logical decoding problem
heapam.c:6976 xlog store incorrect oldtuplen when tuplelen is greater than the value field of uint16.


a uint32 variable is assigned to uint16


The structure that holds the oldkey length is:
typedef struct xl_heap_header_len
{
	uint16		t_len;
	xl_heap_header header;
} xl_heap_header_len;



The problem will lead to logic decoding failure when oldtuplene > 65535 and relreplident = FULL.
The table that triggers the problem is usually relreplident = FULL.

view thread (8+ messages)  latest in thread

Message-ID: <tencent_5B4204547B0BB8C05F9B1D99@qq.com>
Permalink:  ../tencent_5B4204547B0BB8C05F9B1D99@qq.com/
Also on:    postgresql.org/message-id/tencent_5B4204547B0BB8C05F9B1D99@qq.com

 · 

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: anderson2013@qq.com
  Subject: Re: [BUG] pg9.4.10 Logical decoding did not get the correct oldtuplelen
  In-Reply-To: <tencent_5B4204547B0BB8C05F9B1D99@qq.com>
  References: <tencent_5B4204547B0BB8C05F9B1D99@qq.com>

* 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