Bulkdelete and Vacuum operations on custom index

From: Carsten Kropf <ckropf2(at)fh-hof(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Bulkdelete and Vacuum operations on custom index
Date: 2010-03-17 12:04:33
Message-ID: 69DEC1B6-C59B-4B84-A1C8-139D174EA177@fh-hof.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I am currently implementing some index access methods on top of PostgreSQL. Until now, it is pretty fine and working properly. However, I am now doing the implementation of bulk deletion and vacuum of the structure. I don't know exactly, how to achieve this because it would be much easier to just collect statistics in bulkdelete and to implement the "real deal" of deleting the particular entries from my structures when vacuum is called on the index. Is it legitimate to do this: just collect statistics and pass the statistics and items to be deleted in main memory back to the caller and perform the real deletion of entries in vacuum? It would be much easier for me, if I would do this, because of the general structure I have here.
As far as I understand the documentation, vacuum is called when bulkdelete does return some statistics that some entries have been removed. If I would now put some additional information (namely the tuples) that have been deleted to the statistics and pass all of these data to vacuum (like in GiST whereas GiST only sets up a boolean flag) and then would delete the whole collected entries (stored somewhere in main memory), would this be still OK?
Actually I don't know exactly, if this could be done properly, but it would help me much because if I would use a standard approach of deleting in bulk delete and reorganizing in vacuum, I would get into some trouble probably and would have to rethink my whole algorithms (which I was testing in main memory in some outstanding project, before).
Thanks in advance.

Best regards
Carsten Kropf

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Herouth Maoz 2010-03-17 12:43:18 Re: stopping processes, preventing connections
Previous Message Craig Ringer 2010-03-17 11:34:06 Re: stopping processes, preventing connections