Re: CREATE DATABASE ... STRATEGY WAL_LOG issues

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: CREATE DATABASE ... STRATEGY WAL_LOG issues
Дата
Msg-id 20230321163414.q2u5emswmyvhvnfh@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: CREATE DATABASE ... STRATEGY WAL_LOG issues  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: CREATE DATABASE ... STRATEGY WAL_LOG issues  (Robert Haas <robertmhaas@gmail.com>)
Re: CREATE DATABASE ... STRATEGY WAL_LOG issues  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

On 2023-03-21 11:33:59 -0400, Robert Haas wrote:
> On Tue, Mar 21, 2023 at 3:01 AM Andres Freund <andres@anarazel.de> wrote:
> > 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 ...
> 
> Hmm, so share a strategy across all relation forks? You could even
> push it up a level beyond that and share it across all relations being
> copied.

The latter is what I was wondering about.


> That feels like it would be slightly more rational behavior,
> but I'm not smart enough to guess whether anyone would actually be
> happier (or less happy) after such a change than they are now.

Yea, I'm not either. The current behaviour does have the feature that it will
read in some data for each table, but limits trashing of shared buffers for
huge tables. That's good if your small to medium sized source database isn't
in s_b, because the next CREATE DATABASE has a change to not need to read the
data again. But if you have a source database with lots of small relations, it
can easily lead to swamping s_b.

More generally, I still think we need logic to use unused buffers even when
strategies are in use (my current theory is that we wouldn't increase the
usagecount when strategies use unused buffers, so they can be replaced more
easily).

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Request for comment on setting binary format output per session
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Save a few bytes in pg_attribute