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 1nvV0c-0005so-F6 for pgsql-performance@arkaria.postgresql.org; Mon, 30 May 2022 02:19:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nvV0b-0007cL-D8 for pgsql-performance@arkaria.postgresql.org; Mon, 30 May 2022 02:19:53 +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 1nvV0b-0007cC-0R for pgsql-performance@lists.postgresql.org; Mon, 30 May 2022 02:19:53 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nvV0W-0008Hr-By for pgsql-performance@lists.postgresql.org; Mon, 30 May 2022 02:19:52 +0000 Received: by mail-io1-xd2b.google.com with SMTP id 2so10098471iou.5 for ; Sun, 29 May 2022 19:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=02nhTIA2SZon62aUzY4xfP2eduTofUQcOMAWk3aAAVI=; b=AiMHVqrnXr9TiusMwCp2U1xD5EQbMVAd/0angzxNX58lyVoWx/NcVwUu6HlmjLjEMp JRx+p9/OVDAflGiT+kFIDUw6lhIiQmadFVcTMPhCiSa4riEHRLncZq0utGJBefqWUMpO CN1whP4S8q2UweUpJ2k4NFSXqkAnD5D/65mLc8xmZ/XpW5wSBhw8Myx7zTRSk5x0qWqv K3UgmbgiOHx82EL/4jwWj6bmRpDXX4vnUDuuRLKuzvQfBbahaBNathVS2alDWgoPehcG BFu3kE8BymPVKHxvMQAJKZeqCbegw7Z5+KqrshSm1N9QzPrLgwG6baSSdvhj5cRLeGfj /Drw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=02nhTIA2SZon62aUzY4xfP2eduTofUQcOMAWk3aAAVI=; b=NcrQgESR753XxVcJbJT654yW1h/Bb+cAPCsAwdJnt8k3PwIK0m12NKdHc1Oyu8QDHO cgCLePhaIRf/RNGGpclkmuoYUn6zfqMAresTkfrfCRVc6QTNJlCRNGHg5KHg/a3g+Qp6 hze2a/ZC00oKZfgCDfVMYhJh2Qk/M4JieWTyEOy2lQf9NxpuRJvV+/N6mDSAI2A3zsAu uta062YBSpxuL/SSCfj/F0Y0SLj6WTYR7IB0KU5xBhYh5B9yEEoWkescfZ/enMYzgE9j mYtt1Ywl2d3YW52U3DtS+5aW6osBraEmQPn9YG6dToZggozfruHhFEZYWM0LxytDcClj Qe/g== X-Gm-Message-State: AOAM530+pYOX3F+nwI+O2BCtrlLV6uaCLrJDL9Uoa89wRCNDqo385lPP tUSx0030Ci1VUL1XlzQP0RdZBylw+sWpig== X-Google-Smtp-Source: ABdhPJw7RLRoXA/YiuSBBaic2oQl3zl6TuqQgNljzx62soaiyAD1nzuJ9oUST7qxcqkLHRtizzx/oA== X-Received: by 2002:a05:6602:1489:b0:665:7070:a592 with SMTP id a9-20020a056602148900b006657070a592mr14363423iow.152.1653877185409; Sun, 29 May 2022 19:19:45 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id m21-20020a026a55000000b0032e802256a9sm2367814jaf.163.2022.05.29.19.19.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 May 2022 19:19:45 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 2EB508009F4; Sun, 29 May 2022 21:19:44 -0500 (CDT) Date: Sun, 29 May 2022 21:19:44 -0500 From: Justin Pryzby To: "James Pang (chaolpan)" Cc: pgsql-performance@lists.postgresql.org Subject: Re: postgres backend process hang on " D " state Message-ID: <20220530021943.GP19626@telsasoft.com> References: <20220529150157.GM19626@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, May 30, 2022 at 01:19:56AM +0000, James Pang (chaolpan) wrote: > 1. extensions > shared_preload_libraries = 'orafce,pgaudit,pg_cron,pg_stat_statements,set_user' > 2. psql can not login now ,it hang there too, so can not check anything from pg_stats_* views > 3. one main app user and 2 schemas ,no long running transactions . > 4. we use /pgdata , it's on xfs , lvm/vg RHEL8.4 ,it's a shared storage, no use root filesystem. > /dev/mapper/pgdatavg-pgdatalv 500G 230G 271G 46% /pgdata > /dev/mapper/pgdatavg-pgarchivelv 190G 1.5G 189G 1% /pgarchive > /dev/mapper/pgdatavg-pgwallv 100G 34G 67G 34% /pgwal What are the LVM PVs ? Is it a scsi/virt device ? Or iscsi/drbd/??? I didn't hear back if there's any kernel errors. Is the storage broken/stuck/disconnected ? Can you run "time find /pgdata /pgarchive /pgwal -ls |wc" ? Could you run "ps -u postgres -O wchan=============================" Can you strace one of the stuck backends ? It sounds like you'll have to restart the service or VM (forcibly if necessary) to resolve the immediate issue and then collect the other info, and leave a "psql" open to try to (if the problem recurs) check pg_stat_activity and other DB info.