> When doing update operation, for each tuple being modified, > *tuplebuffers_insert()* says that there is no entry for the relation > being modified in the hash table although it was already added when > the first tuple in the table was updated. Why is it so?
Currently, when doing an update, it will actually flush the tuple buffers every time we update a tuple. As a result, we only ever spool up one tuple at a time. This is a good place to put in an optimization like was implemented for insert, but I haven't gotten around to looking into that yet. The memory leak is actually happening because it isn't freeing the attbuffers after flushing. Alexandra Wang and I have a working branch[1] where we tried to plug the leak by freeing the attbuffers, but it has exposed an issue with triggers that I need to understand before I push the fix into the main zedstore branch. I don't like our solution of freeing the buffers either, because they could easily be reused. I'm going to take a stab at making that better before merging in the fix. [1] https://github.com/l-wang/postgres-1/tree/zedstore-fix-memory-issues