Re: Add memory context type to pg_backend_memory_contexts view

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add memory context type to pg_backend_memory_contexts view
Date: 2024-04-24 05:47:51
Message-ID: CAApHDvoqeE5B4NMLCThAA5wAR4okN-BcK99AP=yxCCahhOtfyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 16 Apr 2024 at 13:30, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> In [1] Andres mentioned that there's no way to determine the memory
> context type in pg_backend_memory_contexts. This is a bit annoying as
> I'd like to add a test to exercise BumpStats().
>
> Having the context type in the test's expected output helps ensure we
> are exercising BumpStats() and any future changes to the choice of
> context type in tuplesort.c gets flagged up by the test breaking.

bea97cd02 added a new regression test in sysviews.sql to call
pg_backend_memory_contexts to test the BumpStats() function.

The attached updates the v1 patch to add the new type column to the
new call to pg_backend_memory_contexts() to ensure the type = "Bump"

No other changes.

David

Attachment Content-Type Size
v2-0001-Add-context-type-field-to-pg_backend_memory_conte.patch text/plain 8.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2024-04-24 06:25:22 Re: POC: GROUP BY optimization
Previous Message Masahiko Sawada 2024-04-24 05:43:59 Re: promotion related handling in pg_sync_replication_slots()