Re: POC: Extension for adding distributed tracing - pg_tracing

From: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>, Nikita Malakhov <hukutoc(at)gmail(dot)com>, Jan Katins <jasc(at)gmx(dot)net>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Peter Smith <smithpb2250(at)gmail(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Subject: Re: POC: Extension for adding distributed tracing - pg_tracing
Date: 2024-03-18 14:00:39
Message-ID: CAO6_Xqrs14JYFfKguAjsx4oPXo9-9oLc2edk13sRKMovfDB2bQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I've rebased and updated the patch with some fixes:
- Removed volatile
- Switched from spinlock to LWLock and removed n_writer
- Moved postgres.h as first header on all files
- Removed possible allocations in PG_CATCH. Though I would probably need to
run some more thorough tests on this

I should also have the GitHub repository version of the extension ready
this week.

Regards,
Anthonin

On Fri, Mar 15, 2024 at 3:10 PM Aleksander Alekseev <
aleksander(at)timescale(dot)com> wrote:

> Hi Anthonin,
>
> > [...]
> >
> > The usual approach is to have pre-allocated memory. This must actually
> be written (zeroed usually) or it might be lazily allocated only on page
> fault. And it can't be copy on write memory allocated once in postmaster
> startup then inherited by fork.
> >
> > That imposes an overhead for every single postgres backend. So maybe
> there's a better solution.
>
> It looks like the patch rotted a bit, see cfbot. Could you please
> submit an updated version?
>
> Best regards,
> Aleksander Alekseev (wearing co-CFM hat)
>

Attachment Content-Type Size
v14-0001-Add-pg_tracing-extension-to-contrib.patch application/octet-stream 237.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-03-18 14:02:51 Re: Add LSN <-> time conversion functionality
Previous Message Peter Eisentraut 2024-03-18 13:52:28 Re: speed up a logical replica setup