Re: psql 15beta1 does not print notices on the console until transaction completes

From: Alastair McKinley <a(dot)mckinley(at)analyticsengines(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: psql 15beta1 does not print notices on the console until transaction completes
Date: 2022-05-29 20:59:52
Message-ID: PAXPR02MB7600E503CF85965370C5EB91E3DA9@PAXPR02MB7600.eurprd02.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

>
> From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
> Sent: 29 May 2022 21:47To: Alastair McKinley <a(dot)mckinley(at)analyticsengines(dot)com>; pgsql-general(at)lists(dot)postgresql(dot)org <pgsql-general(at)lists(dot)postgresql(dot)org>Subject: Re: psql 15beta1 does not print notices on the console until transaction completes
>
> On 5/29/22 13:11, Alastair McKinley wrote:
> > Hi all,
> >
> > I notice this change in behaviour with psql in 15beta1 when testing an existing codebase.
> >
> > I didn't see any mention of this change in the release notes and it surprised me.
> >
> > Using this test function:
> >
> > create or replace function test_notice() returns void as
> > $$
> > begin
> > raise notice 'hello';
> > perform pg_sleep(10);
> > end; $$ language plpgsql;
> >
> > In psql 15beta1, the "hello" message only appears on the console when the transaction completes.
>
> I am not seeing that.
>
> Can you provide more information about how you are running test_notice()?
>

Hi Adrian,

I am running the function "select test_notice();" from the psql console with psql/server versions 15beta1.

In psql 15beta1, the notice appears only after the function returns/transaction completes.

If I execute the same function from psql 14.3 and server 15beta1, the notice appears on the psql console immediately as expected, before the pg_sleep() completes.

It's reproducible for me, I just double checked it.

I think Tom was able to reproduce this by the sounds of his response?

Best regards,

Alastair

> >
> > in psql 14.3, it appears immediately as I would have expected.
> >
> > Is there a way to change psql behaviour to display notices immediately as in versions < 15?
> >
> > Best regards,
> >
> > Alastair
> >
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Adrian Klaver 2022-05-29 20:59:53 Re: psql 15beta1 does not print notices on the console until transaction completes
Previous Message Adrian Klaver 2022-05-29 20:47:27 Re: psql 15beta1 does not print notices on the console until transaction completes

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-05-29 20:59:53 Re: psql 15beta1 does not print notices on the console until transaction completes
Previous Message Shaheed Haque 2022-05-29 20:53:34 Is it possible to index "deep" into a JSONB column?