Re: Postgres bug (working with iserverd)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexandr <AVShutko(at)mail(dot)khstu(dot)ru>
Cc: pgsql-bugs(at)postgreSQL(dot)org, Vadim Mikheev <vmikheev(at)sectorbase(dot)com>
Subject: Re: Postgres bug (working with iserverd)
Date: 2001-05-13 04:22:49
Message-ID: 23384.989727769@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

"A.V.Shutko" <AVShutko(at)mail(dot)khstu(dot)ru> writes:
> Your server have a bug that sometimes cause coredumps.....

> Tom Lane> What version of postgres?
> # ./postgres -V
> postgres (PostgreSQL) 7.1

Okay, I think I understand the scenario here. Are you using table
inheritance? I can produce a crash in the same place using UPDATE
of an inheritance group:

regression=# create table par(f1 int);
CREATE
regression=# create table child(f2 int) inherits (par);
CREATE
regression=# insert into par values(1);
INSERT 1453231 1
regression=# begin;
BEGIN
regression=# update par set f1 = f1 + 1;
UPDATE 1

<< now start a second backend, and in it also do >>

regression=# update par set f1 = f1 + 1;

<< second backend blocks waiting for first one to commit;
go back to first backend and do >>

regression=# end;
COMMIT

<< now second backend crashes in exec_append_initialize_next >>

The direct cause of the problem is that EvalPlanQual isn't completely
initializing the estate that it sets up for re-evaluating the plan.
In particular it's not filling in es_result_relations and
es_num_result_relations, which need to be set up if the top plan node
is an Append. (That's probably my fault.) But there are a bunch of
other fields that it's failing to copy, too.

Vadim, I'm thinking that EvalPlanQual would be better if it memcpy'd
the parent estate, and then changed the fields that should be different,
rather than zeroing the child state and then copying the fields that
need to be copied. Seems like the default behavior should be to copy
fields rather than leave them zero. What do you think? Which fields
should really be zero in the child?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Neil Conway 2001-05-13 04:53:12 Re: Bug with timestamp !!!
Previous Message Neil Conway 2001-05-13 04:09:25 Re: Bug with timestamp !!!

Browse pgsql-hackers by date

  From Date Subject
Next Message carl garland 2001-05-13 05:25:18 Re: 7.2 items
Previous Message Stephan Szabo 2001-05-13 03:50:39 Re: bug in "create unique index"