Skip site navigation (1) Skip section navigation (2)

Re: BUG #6200: standby bad memory allocations on SELECT

From: Bridget Frey <bridget(dot)frey(at)redfin(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Brauwerman <michael(dot)brauwerman(at)redfin(dot)com>, Peter Geoghegan <peter(at)2ndquadrant(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6200: standby bad memory allocations on SELECT
Date: 2012-01-31 13:47:57
Message-ID: -1661306214659431052@unknownmsgid (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
We have no DDL whatsoever in the code.  We do update rows in the
logins table frequently, but we basically have a policy of only doing
DDL changes during scheduled upgrades when we bring the site down.  We
have been discussing this issue a lot and we really haven't come up
with anything that would be considered unusual here.  The tables
experiencing issues have maybe 1M to 200M rows, we do updates and
selects frequently, they have standard btree primary key indexes, and
the failing query always seems to be a select for a single row based
on a primary key lookup.  All of these code paths worked flawlessly
prior to our 9.1 upgrade (we had been using skytools replication).
And we see no problems on the master despite similar workloads there.
It is definitely puzzling, and we are not too sure what to look into

Sent from my iPhone

On Jan 30, 2012, at 9:06 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> I wrote:
>> Hm.  The stack trace is definitive that it's finding the bad data in a
>> tuple that it's trying to print to the client, not in an index.
> BTW, after a bit more reflection it occurs to me that it's not so much
> that the data is necessarily *bad*, as that it seemingly doesn't match
> the tuple descriptor that the backend's trying to interpret it with.
> (In particular, the reported symptom would be consistent with finding
> a small integer constant at a place where the descriptor expects to find
> a variable-length field.)  So that opens up a different line of thought
> about how those could get out of sync on a standby.  Are you in the
> habit of issuing ALTER TABLE commands to add/delete/change columns on
> these tables?  In fact, is there any DDL whatsoever going on around the
> time these failures happen?
>            regards, tom lane

In response to

pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2012-01-31 15:03:07
Subject: Re: BUG #6200: standby bad memory allocations on SELECT
Previous:From: 139669962Date: 2012-01-31 09:35:57
Subject: BUG #6423: max_standby_streaming_delay does not work

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group