RE: temp table on commit delete rows performance issue - Mailing list pgsql-hackers

From Floris Van Nee
Subject RE: temp table on commit delete rows performance issue
Date
Msg-id d2784ba7b95a4c3ca382115592947822@Optiver.com
Whole thread Raw
In response to Re: temp table on commit delete rows performance issue  (feichanghong <feichanghong@qq.com>)
Responses Re: temp table on commit delete rows performance issue
List pgsql-hackers
> I also encountered the similar performance issue with temporary tables
> andprovided a patch to optimize the truncate performance during commit
> in [1].

Interesting, that is definitely another good way to improve the performance,
especially with a large number of temp tables. I think the two optimizations
can actually work well together.
Your optimization on only truncating the tables that are actually used.
Combined with a patch like attached which makes sure that no WAL is generated at all
for the ON COMMIT DELETE ROWS operation.

On my test system this reduces WAL generation for the pgbench test case
I posted previously to 0 (and therefore brought WAL replay process CPU usage
from 100% CPU and lagging behind to only 0% CPU usage)

-Floris


Attachment

pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: CI, macports, darwin version problems
Next
From: Fujii Masao
Date:
Subject: Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal