CREATE DATABASE ... STRATEGY WAL_LOG issues

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: CREATE DATABASE ... STRATEGY WAL_LOG issues
Date: 2023-03-21 07:01:13
Message-ID: 20230321070113.o2vqqxogjykwgfrr@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While hacking on my relation extension patch I found two issues with WAL_LOG:

1) RelationCopyStorageUsingBuffer() doesn't free the used strategies. This
means we'll use #relations * ~10k memory

2) RelationCopyStorageUsingBuffer() gets the buffer for the target relation
with RBM_NORMAL, therefore requiring a read of a block guaranteed to be
zero

Easy enough to fix and shows clear improvement. One thing I wonder is if it's
worth moving the strategies up one level? Probaly not, but ...

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-03-21 07:15:22 Re: Timeline ID hexadecimal format
Previous Message Kurlaev Jaroslav 2023-03-21 06:51:42 RE: Smoothing the subtrans performance catastrophe