Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gC9Ox-0007z1-O5 for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Oct 2018 20:23:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gC9Ou-0004Gb-Rh for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Oct 2018 20:23:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gC9Ou-0004GL-89 for pgsql-hackers@lists.postgresql.org; Mon, 15 Oct 2018 20:23:40 +0000 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gC9Om-0000pn-2J for pgsql-hackers@lists.postgresql.org; Mon, 15 Oct 2018 20:23:38 +0000 Received: by mail-qk1-x732.google.com with SMTP id m8-v6so12691207qka.12 for ; Mon, 15 Oct 2018 13:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=Uyj/AZXBidkuj7QrC/6DGPxUnRRHU8hib0xYfcqQv6M=; b=usfgB47edjykRDc3bT1pKGJ+5NxFI1CovtD+JxTdxLfpRHhpuH1m7eZlYkZQrMV4oZ gEuMpkzgnfaQ24Q+rWbSDwp2T4FCWFn8D3Ak3ZzqwhMCFKwMZaElv4n0G5DVvbUMXVqV 24Csr2KM45IoX8KdDhnsM5rXz1GMbddzqNtW+n5+xYNaiiHYc1xHa3KiS2Xn36FcMQA5 d1CTeLjB9Ds8IXoNI205T2w8EVWTCcZ/gX1lyRriClYAjGjnJeG1SZ39EhhZnR9tlYx9 xkYl7iPppMtfrFFiuUWVQJIYWBo0CnZyY+iJkCIRDGSffssfVQ/RwbyAlgzX6MTwGmDm X7IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Uyj/AZXBidkuj7QrC/6DGPxUnRRHU8hib0xYfcqQv6M=; b=dcsEDM/Ad9eI4kYR5TJsRKcBP0FtFR9ltVtqCEnUfayqXwbIscPcUnv3YT1C/nlU3h mHr+Ui/NaHzDYuRNYLMzKw6JxyiODaQZQWRoZC4kwjW1z/VnOYJb1Dl5tV/EIUIOXXtZ hI9sW6SPtohSkUEm/kN6k3sCPaDF6unaOc5zn9Y5zgPb4UTh04OoGWyxlwITjgUtzH4e K66k4zs7G/blyJu7achMWKeoZM/ay/l0NJS7VzDbXtYDdQnudB/yHVIMSo4/Q9S4eO/w Xi9jrHq8XruSHXHP5xQvfoFLDE7wEavDk6xJLgzhdjY6li7WAeOcoRnhM4NdyMXPoqXf DQnw== X-Gm-Message-State: ABuFfohI+GEvWCGJXDg9WF47Op6VGdl8pbwLXM8Wu1ILfP5J1Zbn2Zq1 9JIH1+/0HixPs0Uv/h3pKxuLq6n4nKDYW7Ql/fhlvYegQj17TQlZwzwUAVYRiqvSm3iQa0aVPZo QqWoC2bDAE6tsJ4OnCPsLjGP75tkWTS2qslRl6VRbDc7P+XWZX6tdyVkRGdl4U9tbMbvpGgW3KD eEJAdyHKykmr8cVt2rwfZq X-Google-Smtp-Source: ACcGV62YVQgAWm3MmX8pSqfF1vzMWA0RSvrzdkkOz1x4FAh+JKdxuwKYPsIKZyOpGd7h15iKksQQWg== X-Received: by 2002:a37:cf88:: with SMTP id v8-v6mr16718506qkl.355.1539635010920; Mon, 15 Oct 2018 13:23:30 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id f90-v6sm9308257qkf.49.2018.10.15.13.23.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 13:23:30 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: Inadequate failure reporting from poll_query_until To: Tom Lane , pgsql-hackers@lists.postgresql.org References: <17913.1539634756@sss.pgh.pa.us> Message-ID: <91ec0b8e-4dbf-aa07-eb68-875de46807f3@2ndQuadrant.com> Date: Mon, 15 Oct 2018 16:23:29 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <17913.1539634756@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/15/2018 04:19 PM, Tom Lane wrote: > I just spent some time puzzling over why we've seen so many recoveryCheck > failures in the buildfarm recently --- excluding failures with known > causes, such as the pg_verify_checksums business, that's basically all > we've seen for the last week. I am suspicious that there's some > timing-dependent problems in WAL streaming startup and shutdown, but > can't prove anything yet. However, one case catches my eye: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=snapper&dt=2018-10-15%2016%3A01%3A59 > > This is the sum total of the visible logged information: > > # > not ok 2 - asterisk in synchronous_standby_names > > # Failed test 'asterisk in synchronous_standby_names' > # at t/007_sync_rep.pl line 26. > > The failing test is evidently this one: > > test_sync_state( > $node_master, qq(standby1|1|sync > standby2|1|potential > standby3|1|potential), > 'asterisk in synchronous_standby_names', > '*'); > > and when you drill down, you find that PostgresNode.pm's poll_query_until > must have timed out, and that blank line there is as much as it felt like > telling us about it. Evidently what we were getting back from the server > did not match the expected output, but good luck guessing what it was. > > I think we ought to fix poll_query_until so that upon failure, you get > a much more complete and intelligible report, along the lines of > > poll_query_until timed out executing this query: > $query > expecting this output: > $expected > last actual query output: > $stdout > with stderr: > $stderr > > Objections? Thoughts about better formatting? WFM. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services