public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alexander Korotkov <[email protected]>
To: Andrey M. Borodin <[email protected]>
Cc: Japin Li <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Junwang Zhao <[email protected]>
Cc: 邱宇航 <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: Andrew Borodin <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Nikolay Samokhvalov <[email protected]>
Cc: pgsql-hackers mailing list <[email protected]>
Cc: pgsql-hackers mailing list <[email protected]>
Cc: Andres Freund <[email protected]>
Subject: Re: Transaction timeout
Date: Mon, 11 Mar 2024 13:18:01 +0200
Message-ID: <CAPpHfduKa6rh48LNVG3_X5_7BiAO3+RKtRj-XPWEN2StVkAHLA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<ME3P282MB3166A9BFA45239291EBC5F1CB667A@ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM>
<[email protected]>
<CAHut+PuOdzypMrK3HsSr0F2fyn8VO5z2+EZ=6Sz39QNbBrisHQ@mail.gmail.com>
<[email protected]>
<ME3P282MB316697D91841CF4EE86CF882B6792@ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM>
<[email protected]>
<ME3P282MB3166A01CE3BC1B8B9C846A75B67C2@ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM>
<[email protected]>
<CAPpHfds=ByL_MEZunF7P+AaDJ7xv7LD8kHcV9awWZx5fOJZBRw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<ME3P282MB31662287F06AE5D788869D8DB6512@ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM>
<[email protected]>
<CAPpHfduK9Dzcsr3bVaO10A7M-ik49825oaOq5=Z=4FZGtusgcg@mail.gmail.com>
<[email protected]>
<CAPpHfdtJnJs3xMGJGxLVrYf6kitMiwADa4R1Ej6mY49N1sDt6w@mail.gmail.com>
<[email protected]>
On Mon, Mar 11, 2024 at 12:53 PM Andrey M. Borodin <[email protected]> wrote:
> > On 7 Mar 2024, at 00:55, Alexander Korotkov <[email protected]> wrote:
> >
> > On Wed, Mar 6, 2024 at 10:22 AM Andrey M. Borodin <[email protected]> wrote:
> >>> On 25 Feb 2024, at 21:50, Alexander Korotkov <[email protected]> wrote:
> >>>
> >>> Thank you for the patches. I've pushed the 0001 patch to avoid
> >>> further failures on buildfarm. Let 0004 wait till injections points
> >>> by Mechael are committed.
> >>
> >> Thanks!
> >>
> >> All prerequisites are committed. I propose something in a line with this patch.
> >
> > Thank you. I took a look at the patch. Should we also check the
> > relevant message after the timeout is fired? We could check it in
> > psql stderr or log for that.
>
> PFA version which checks log output.
> But I could not come up with a proper use of BackgroundPsql->query_until() to check outputs. And there are multiple possible errors.
>
> We can copy test from src/bin/psql/t/001_basic.pl:
>
> # test behavior and output on server crash
> my ($ret, $out, $err) = $node->psql('postgres',
> "SELECT 'before' AS running;\n"
> . "SELECT pg_terminate_backend(pg_backend_pid());\n"
> . "SELECT 'AFTER' AS not_running;\n");
>
> is($ret, 2, 'server crash: psql exit code');
> like($out, qr/before/, 'server crash: output before crash');
> ok($out !~ qr/AFTER/, 'server crash: no output after crash');
> is( $err,
> 'psql:<stdin>:2: FATAL: terminating connection due to administrator command
> psql:<stdin>:2: server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> psql:<stdin>:2: error: connection to server was lost',
> 'server crash: error message’);
>
> But I do not see much value in this.
> What do you think?
I think if checking psql stderr is problematic, checking just logs is
fine. Could we wait for the relevant log messages one by one with
$node->wait_for_log() just like 040_standby_failover_slots_sync.pl do?
------
Regards,
Alexander Korotkov
view thread (61+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Transaction timeout
In-Reply-To: <CAPpHfduKa6rh48LNVG3_X5_7BiAO3+RKtRj-XPWEN2StVkAHLA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox