Re: Further pg_upgrade analysis for many tables - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Further pg_upgrade analysis for many tables
Date
Msg-id 20121114200109.GA12213@alvh.no-ip.org
Whole thread Raw
In response to Re: Further pg_upgrade analysis for many tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Further pg_upgrade analysis for many tables  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Tom Lane escribió:
> Jeff Janes <jeff.janes@gmail.com> writes:

> > The next quadratic behavior is in init_sequence.
>
> Yeah, that's another place that is using a linear list that perhaps
> should be a hashtable.  OTOH, probably most sessions don't touch enough
> different sequences for that to be a win.

Could we use some adaptive mechanism here?  Say we use a list for the
first ten entries, and if an eleventh one comes in, we create a hash
table for that one and all subsequent ones.  All future calls would
have to examine both the list for the first few and then the hash table.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Further pg_upgrade analysis for many tables
Next
From: Tom Lane
Date:
Subject: Re: Enabling Checksums