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

2022-05-29 Thread Rob Sargent

On 5/29/22 18:00, Adrian Klaver wrote:

On 5/29/22 15:03, Tom Lane wrote:

Adrian Klaver  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/20220529/

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





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

2022-05-29 Thread Adrian Klaver

On 5/29/22 15:03, Tom Lane wrote:

Adrian Klaver  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/20220529/

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.kla...@aklaver.com




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

2022-05-29 Thread Tom Lane
Adrian Klaver  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

2022-05-29 Thread Adrian Klaver

On 5/29/22 13:59, Alastair McKinley wrote:

 >
 > From: Adrian Klaver 
 > 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.kla...@aklaver.com




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

2022-05-29 Thread Alastair McKinley
>
> From: Adrian Klaver 
> Sent: 29 May 2022 21:47To: Alastair McKinley 
> ; 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.kla...@aklaver.com


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

2022-05-29 Thread Adrian Klaver

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.kla...@aklaver.com




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

2022-05-29 Thread Adrian Klaver

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.kla...@aklaver.com