Re: Phantom Command ID

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Phantom Command ID
Date: 2006-09-21 13:52:36
Message-ID: 29290.1158846756@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> We could also limit the size of the hash table, which takes up most of
> the memory, and only keep the latest phantom cids there. Presumably, if
> current command id is 1000, you're not likely to set cmax to 500 on any
> tuple in that transaction anymore.

The downside of that though is that if you did generate any such, you'd
assign a fresh (duplicate) phantom cid --- so you're bloating the array
in exchange for reducing the hash size.

It is quite easy to have current command counter much greater than the
CID of a still-live command: consider for example an UPDATE that is
firing triggers as it goes, and each trigger executes some queries.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-09-21 14:02:44 Re: 'configure --disable-shared' and 'make check'
Previous Message Simon Riggs 2006-09-21 12:22:08 Re: [COMMITTERS] pgsql: Add documentation for new in-core advisory