Re: Regarding ambulkdelete, amvacuumcleanup index methods

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Abinaya k <abinaya(dot)k(dot)496(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regarding ambulkdelete, amvacuumcleanup index methods
Date: 2018-01-24 07:54:22
Message-ID: CAD21AoDr6=5BbJp4coAXSd5WJu9jsK61hKNn1q5Ums8VW1sz+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 24, 2018 at 1:27 PM, Abinaya k <abinaya(dot)k(dot)496(at)gmail(dot)com> wrote:
> Hai all,
> We are building In-memory index extension for postgres. We would
> capture table inserts, updates, deletes using triggers. During vacuum
> operation, postgres would give calls to ambulkdelete, amvacuumcleanup (as
> part of index cleanup). As we handle all updates, deletes using triggers, we
> don't have to do any index cleanup in ambulkdelete. But, what stats should i
> return from ambulkdelete and amvacuumcleanup? Is that necessary to return
> stats from ambulkdelete and amvacuumcleanup ?

Both ambulkdelete and amvacuumcleanup return an IndexBulkDeleteResult.
If you return a non-NULL value, the values of returned
IndexBulkDeleteResult are used for updating the index statistics and
reporting the statistics of bulk deletion in lazy_cleanup_index. For
example, num_pages and num_index_tuples are used for updating
pg_class.relpages and pg_class.reltuples. But if you return NULL from
them, these are skipped.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2018-01-24 08:00:07 Re: PATCH: pgbench - option to build using ppoll() for larger connection counts
Previous Message Gaddam Sai Ram 2018-01-24 07:37:16 Help needed in using 'on_dsm_detach' callback