Re: Phantom Command ID - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Phantom Command ID
Date
Msg-id 29290.1158846756@sss.pgh.pa.us
Whole thread Raw
In response to Re: Phantom Command ID  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki@enterprisedb.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


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Add documentation for new in-core advisory
Next
From: Tom Lane
Date:
Subject: Re: 'configure --disable-shared' and 'make check'