Re: Something is wrong with wal_compression

From: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, Andrey Borodin <amborodin86(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Something is wrong with wal_compression
Date: 2023-01-28 03:07:40
Message-ID: CAOtHd0Bde_VaL_n9M-u25L41FqpBLWGZt+BzRQ2gFO4E4unpXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 27, 2023, 18:58 Andres Freund <andres(at)anarazel(dot)de> wrote:

> Hi,
>
> On 2023-01-27 16:15:08 +1300, Thomas Munro wrote:
> > It would be pg_current_xact_id() that would have to pay the cost of
> > the WAL flush, not pg_xact_status() itself, but yeah that's what the
> > patch does (with some optimisations). I guess one question is whether
> > there are any other reasonable real world uses of
> > pg_current_xact_id(), other than the original goal[1].
>
> txid_current() is a lot older than pg_current_xact_id(), and they're
> backed by
> the same code afaict. 8.4 I think.
>
> Unfortunately txid_current() is used in plenty montiring setups IME.
>
> I don't think it's a good idea to make a function that was quite cheap for
> 15
> years, suddenly be several orders of magnitude more expensive...

As someone working on a monitoring tool that uses it (well, both), +1. We'd
have to rethink a few things if this becomes a performance concern.

Thanks,
Maciek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-01-28 03:07:51 Re: Something is wrong with wal_compression
Previous Message Andres Freund 2023-01-28 02:57:58 Re: Something is wrong with wal_compression