Re: PG15 beta1 sort performance regression due to Generation context change

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PG15 beta1 sort performance regression due to Generation context change
Date: 2022-05-23 22:04:15
Message-ID: 1347835.1653343455@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> GenerationRealloc: uses "size" to figure out if the new size is
> smaller than the old size. Maybe we could just always move to a new
> chunk regardless of if the new size is smaller or larger than the old
> size.

I had the same idea ... but we need to know the old size to know how much
to copy.

> GenerationGetChunkSpace: Uses "size" to figure out the amount of
> memory is used by the chunk. I'm not sure how we'd work around the
> fact that USEMEM() uses that extensively in tuplesort.c to figure out
> how much memory we're using.

Ugh, that seems like a killer.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-05-23 22:09:18 Re: PG15 beta1 sort performance regression due to Generation context change
Previous Message Tom Lane 2022-05-23 22:02:11 Re: PG15 beta1 sort performance regression due to Generation context change