Re: PATCH: optimized DROP of multiple tables within a transaction

Tomas Vondra <tv@fuzzy.cz>

From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-hackers@postgresql.org
Date: 2013-01-01T16:43:53Z
Lists: pgsql-hackers
On 1.1.2013 17:35, Alvaro Herrera wrote:
> There was an earlier suggestion by Andres Freund to use memcmp()
> instead, but I don't see that in the latest posted version of the patch;
> was there a specific rationale for taking it out or it was just lost in
> the shuffle?

No, I've tried that approach with a comparator like this:

    static int
    rnode_comparator(const void * p1, const void * p2)
    {
            return memcmp(p1, p2, sizeof(RelFileNode));
    }

but it turned out to be slower than the current comparator. I've posted
some benchmark results and possible explanation on 20/12 (message
50D26FE8.1040800@fuzzy.cz).

If you could verify my results, that'd be great.

Tomas


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Accelerate end-of-transaction dropping of relations