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 1okLHQ-0006Zl-QX for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Oct 2022 08:15:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1okLHP-0006yU-LO for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Oct 2022 08:15:23 +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 1okLHP-0006yF-Bh for pgsql-bugs@lists.postgresql.org; Mon, 17 Oct 2022 08:15:23 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1okLHN-0006YE-S4 for pgsql-bugs@lists.postgresql.org; Mon, 17 Oct 2022 08:15:22 +0000 Received: by mail-pg1-x531.google.com with SMTP id s196so8511533pgs.3 for ; Mon, 17 Oct 2022 01:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CjzjnZPLZiIof8p1BLSE42TmED80ZIw8U8JMXP5YGv0=; b=cjdVM05Dgg9v+tgVZHb9bdc2nPMZ5iivOC/qDRF7dw0upRlw6iXzU+oXLEbF9y/76F 5GXTLktFekkOF4loVg7tBX88uoCmhPQBAKGKUwB5PCy/I1DZb4Ugf8Kz7ZX4mI006a+M jXm8SWWKwmFb14JCH3ngSF3b6HhGzdceGSJFU9lQDfy/06nBFE2AdWU84Hp+brMKrCZQ N0LZcKRru1NwaheSbc9w6N9Ny0nrG6s2rk49w8YKSMcBQkd618v7iZCb8ZnZguNFllwL ASSu5atx3+p0/Ol+NrstYf+1KTDbbe7C9Mp/r+W9XNtZdeD8KV5jBqDIQQhvx2/AZ189 UG4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CjzjnZPLZiIof8p1BLSE42TmED80ZIw8U8JMXP5YGv0=; b=aIjbmVyXSLsZaO4Ja80/wUhZIYhgfnVAEd7IPtjxqWelaKWQJbrFNjT4sOJwiYiCB5 W/Z3groIPD4XmkSxf4S2Sh9DcH+AqcxeY8AMNsn9efWNYKZahjk5FAMnADo3D9bu74Sx ejBr4ZVPrtC5irUbGZMtbG+vEeIeP/3gxDt9MNFOqcaqxFiNd60eCeMxtM2YGLr6WNif WdzOULcwsXXZjCQzDL7h3S+hbGBlmKG7NYMykMCF6XhpLHt3x1SNJDJVkD8rO6loE7zP kMLVNj28JIwLZgzb5t1Xaa4U6i0IY/or4476zQPJMrhodGXqfdkuVvkfedVc1gHNgK/k PhjA== X-Gm-Message-State: ACrzQf3iWeCKDeXphJyQdJBwsTul+gTblTvyKW0HwzUufYrvBxxNxx6e AoJbOJd4tipgA77T0xA46Uc= X-Google-Smtp-Source: AMsMyM6ddYKCEr06vvGhdgOl45A4tGzNiD/45bM19VQrMnjeB+M06CLt9J7SOFGb1txB51DxKr80XA== X-Received: by 2002:a63:4e16:0:b0:43f:3554:ff9c with SMTP id c22-20020a634e16000000b0043f3554ff9cmr9979701pgb.578.1665994519772; Mon, 17 Oct 2022 01:15:19 -0700 (PDT) Received: from jrouhaud (2001-b011-1006-fb32-3818-b9aa-05ea-bab9.dynamic-ip6.hinet.net. [2001:b011:1006:fb32:3818:b9aa:5ea:bab9]) by smtp.gmail.com with ESMTPSA id o128-20020a62cd86000000b0056188850950sm6305364pfg.180.2022.10.17.01.15.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 01:15:19 -0700 (PDT) Date: Mon, 17 Oct 2022 16:15:16 +0800 From: Julien Rouhaud To: thien.phan@apollo.edu.vn, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17645: Strange queries that stuck in database system Message-ID: <20221017081516.g2elezml2fppsubf@jrouhaud> References: <17645-7cbc0f9bf94bb2a6@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17645-7cbc0f9bf94bb2a6@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Sun, Oct 16, 2022 at 11:43:24PM +0000, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 17645 > Logged by: Thien, Phan Phuoc > Email address: thien.phan@apollo.edu.vn > PostgreSQL version: 14.0 Unrelated, but you should definitely update to the latest minor version (so 14.5 right now). > Operating system: Windows Server 2012 R2 > Description: > > When I run this query > > SELECT NOW() - query_start AS elapsed, pid, client_addr, query, > query_start, * > FROM pg_stat_activity > WHERE query != '' AND query NOT ILIKE '%pg_stat_activity%' > ORDER BY query_start DESc; > > I noticed that there are many queries (as below) that create many Windows > processes and CPU is 100%. Is it a bug? Please help! Nothing here looks like a bug. Note that your query is incorrect as there's a dedicated "state" field to give this information since version 9.2, so a bit more than 10 years ago. You can refer to https://www.postgresql.org/docs/14/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW for more details about this view. I'm not sure if you had question related to the rest of the message, but if you do please send a message to pgsql-general list instead (https://www.postgresql.org/list/).