Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiYTz-0003wA-AY for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Nov 2020 07:47:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kiYTy-00053V-9S for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Nov 2020 07:47:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiYTy-00053O-2a for pgsql-hackers@lists.postgresql.org; Fri, 27 Nov 2020 07:47:54 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kiYTv-00069w-PB for pgsql-hackers@postgresql.org; Fri, 27 Nov 2020 07:47:53 +0000 Received: by mail-pf1-x432.google.com with SMTP id y7so3776863pfq.11 for ; Thu, 26 Nov 2020 23:47:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=WYn/+PfOCSNj3bCrIsSleZYCmfSITLWd/c5LYwSyc5U=; b=qpH6vTF6P2OZbK0VJFlaCoW3utNK8PZqUWGqOM0ePkruumuIgwBzYmjwD45ABgTSFO iKwnwp9XuToB803hIK+xxfn9qv4ffPOszuovOYL0yEaw9RGvfgtPO2c0mFOUaDKKLiY8 rbi7Bq1xoq4dAf+Tb+2hBjXgZNlcq8pZWQchQcUW9nsG2Igtj1d2G/ababV10lAHqCFX LJfazX8C4y8ZWXzoihDpmKZjq3Gi9CEaDJTvnFZ9Gkm1QwYTs+1/rsyYwKvjjcGbP63m cV8lkgRkgUeOjrrFbgRkckMEZgwra1HXypnk4pikYOvNWhTxWt6ULraAoPSXSW/43eiO PvZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WYn/+PfOCSNj3bCrIsSleZYCmfSITLWd/c5LYwSyc5U=; b=lyTI9xZgz+k+sgevBQ5kWy/FQC58evWal5laMtQ+t2AW+v0CX24XuZ221TmBZNnx6p E/+YdAQwY0NpcS9gABFX4RHzVcVXT6/Tix14k28/Rh3iZGLUvqhXLc29OqTW2q4Q8q8V 0xs2eHsRHRRUCoGaEVuNvtqx8l876VZikrEomo8YStaJ6MSvjMc9c2wgPGqQpmyBkrY9 d9G/XW7obSwChBK8b3+PBYPz6ZY0WsrqiRcFahFXDqrol504Wv12vCsK1HZhPc9E8uwm OrIll2stBW+iTEPPiN4WQIyZp/NnyWiZ1nHD/8hLkIhXPMvWlJIqaociZhukrE3cGeks LqOg== X-Gm-Message-State: AOAM530OMwtinsFTQ4RuMgat/DzIrY63MG1+OgUSa1xMB9jTDbu4b2Nv bBxbnHWFupMYCyPl1hMdObim20MowOB0KAUKVtw= X-Google-Smtp-Source: ABdhPJwsYggDsvSuCGO5fHBDUV2j0sbIU0CN8GvkZM5T6B6lNevITJf0MjAKcCe5PXzVd90gVnTxI0Bfrr8hs++GndM= X-Received: by 2002:a17:90b:3011:: with SMTP id hg17mr4048996pjb.22.1606463269939; Thu, 26 Nov 2020 23:47:49 -0800 (PST) MIME-Version: 1.0 References: <13156732-5189-af54-3d28-e2ee2a8568e0@oss.nttdata.com> <069fb3bc-3907-4d85-19fd-e4b2d2f004b4@oss.nttdata.com> <1ae40b1b-2f42-4510-1514-40bb7d7255ab@oss.nttdata.com> <3f292fbb-f155-9a01-7cb2-7ccc9007ab3f@oss.nttdata.com> <9e3f88cd-0cc4-ac9e-4102-505ac8213fc9@oss.nttdata.com> In-Reply-To: <9e3f88cd-0cc4-ac9e-4102-505ac8213fc9@oss.nttdata.com> From: Bharath Rupireddy Date: Fri, 27 Nov 2020 13:17:38 +0530 Message-ID: Subject: Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module To: Fujii Masao Cc: Craig Ringer , PostgreSQL-development , Robert Haas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Nov 27, 2020 at 12:26 PM Fujii Masao wrote: > > > > > When I read the patch again, I found that, with the patch, the shu= tdown > > > > of worker_spi causes to report the following FATAL message. > > > > > > > > FATAL: terminating connection due to administrator command > > > > > > > > Isn't this message confusing because it's not a connection? If so, > > > > we need to update ProcessInterrupts() so that the proper message i= s > > > > reported like other bgworkers do. > > > > > > > > > > This is also true for all the bgworker that use the die() handler. H= ow about doing it the way bgworker_die() does in ProcessInterrupts()? This = would give meaningful information. Thoughts? If okay, I can make a separate= patch. > > > > > > > Attaching the patch that improved the message for bg workers in Process= Interrupts(). For instance, now it looks like *FATAL: terminating backgrou= nd worker "worker_spi" due to administrator command* or *FATAL: terminatin= g background worker "parallel worker" due to administrator command *and so = on for other bg workers.* > > * > > > > Please review the patch. > > Thanks for the patch! It looks good to me. > Thanks! With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com