Thread: psql 15beta1 does not print notices on the console until transaction completes
psql 15beta1 does not print notices on the console until transaction completes
From
Alastair McKinley
Date:
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. 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
Re: psql 15beta1 does not print notices on the console until transaction completes
From
Adrian Klaver
Date:
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()? > > 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.klaver@aklaver.com
Re: psql 15beta1 does not print notices on the console until transaction completes
From
Alastair McKinley
Date:
>
> From: Adrian Klaver <adrian.klaver@aklaver.com>
> Sent: 29 May 2022 21:47To: Alastair McKinley <a.mckinley@analyticsengines.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.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.klaver@aklaver.comRe: psql 15beta1 does not print notices on the console until transaction completes
From
Adrian Klaver
Date:
On 5/29/22 13:47, Adrian Klaver wrote: > On 5/29/22 13:11, Alastair McKinley wrote: >> Hi all, >> In psql 15beta1, the "hello" message only appears on the console when >> the transaction completes. > > I am not seeing that. I take that back, I was using psql 14.3 to connect to the 15 instance. When I changed to psql 15 I saw the same thing. > >> Best regards, >> >> Alastair >> > > -- Adrian Klaver adrian.klaver@aklaver.com
Re: psql 15beta1 does not print notices on the console until transaction completes
From
Adrian Klaver
Date:
On 5/29/22 13:59, Alastair McKinley wrote: > > > > From: Adrian Klaver <adrian.klaver@aklaver.com> > > Sent: 29 May 2022 21:47To: Alastair McKinley > 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. Yeah, I see the same thing after using the new psql. > > I think Tom was able to reproduce this by the sounds of his response? I have not received that post yet. I do see it in the archives. I had already tried: \set SHOW_ALL_RESULTS off which is supposed to restore to previous behavior, but it did not lead to the 14.3 result. > > Best regards, > > Alastair > -- Adrian Klaver adrian.klaver@aklaver.com
Re: psql 15beta1 does not print notices on the console until transaction completes
From
Tom Lane
Date:
Adrian Klaver <adrian.klaver@aklaver.com> writes: > On 5/29/22 13:59, Alastair McKinley wrote: >> I think Tom was able to reproduce this by the sounds of his response? > I have not received that post yet. I do see it in the archives. I re-addressed it to pgsql-bugs, maybe you are not subscribed to that? regards, tom lane
Re: psql 15beta1 does not print notices on the console until transaction completes
From
Adrian Klaver
Date:
On 5/29/22 15:03, Tom Lane wrote: > Adrian Klaver <adrian.klaver@aklaver.com> writes: >> On 5/29/22 13:59, Alastair McKinley wrote: >>> I think Tom was able to reproduce this by the sounds of his response? > >> I have not received that post yet. I do see it in the archives. > > I re-addressed it to pgsql-bugs, maybe you are not subscribed to that? I am not, still I see it here: https://www.postgresql.org/list/pgsql-general/since/202205290000/ And when I click on the message: https://www.postgresql.org/message-id/3662994.1653856025%40sss.pgh.pa.us Lists: pgsql-bugs pgsql-general I will admit that the mailing list software is a mystery to me, so it is entirely possible I am misreading the above. > > regards, tom lane -- Adrian Klaver adrian.klaver@aklaver.com
Re: psql 15beta1 does not print notices on the console until transaction completes
From
Rob Sargent
Date:
On 5/29/22 18:00, Adrian Klaver wrote: > On 5/29/22 15:03, Tom Lane wrote: >> Adrian Klaver <adrian.klaver@aklaver.com> writes: >>> On 5/29/22 13:59, Alastair McKinley wrote: >>>> I think Tom was able to reproduce this by the sounds of his response? >> >>> I have not received that post yet. I do see it in the archives. >> >> I re-addressed it to pgsql-bugs, maybe you are not subscribed to that? > > I am not, still I see it here: > > https://www.postgresql.org/list/pgsql-general/since/202205290000/ > > And when I click on the message: > > https://www.postgresql.org/message-id/3662994.1653856025%40sss.pgh.pa.us > > Lists: pgsql-bugs pgsql-general > > I will admit that the mailing list software is a mystery to me, so it > is entirely possible I am misreading the above. > FWIW, I didn't see Tom's first (bugs) post either. Nor am I subscribed to bugs