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

Alastair McKinley <a.mckinley@analyticsengines.com>

From: Alastair McKinley <a.mckinley@analyticsengines.com>
To: "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2022-05-29T20:11:22Z
Lists: pgsql-bugs, pgsql-general
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


Commits

  1. psql: Show notices immediately (again)