Re: performance issue in remove_from_unowned_list()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: performance issue in remove_from_unowned_list()
Date: 2019-03-13 12:12:01
Message-ID: CA+TgmobHscKHVBLfZ0k43hXoq6vP8R5CB6i686jCZQtW7ASoaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 12, 2019 at 6:54 PM Tomas Vondra
<tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
> Attached is a patch adopting the dlist approach - it seems to be working
> quite fine, and is a bit cleaner than just slapping another pointer into
> the SMgrRelationData struct. So I'd say this is the way to go.

What about using a data structure that supports O(1) lookups for any element?

The current efforts all seem to revolve around correctly guessing from
which end of the list we are likely to delete stuff, but your research
suggests that we don't always make such guesses particularly well.
And it seems unnecessary.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-03-13 12:15:33 Re: Using condition variables to wait for checkpoints
Previous Message Peter Eisentraut 2019-03-13 12:03:46 Fix handling of unlogged tables in FOR ALL TABLES publications