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 1mmhsa-00010i-92 for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Nov 2021 19:43:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mmhsZ-0003f1-3Y for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Nov 2021 19:42:59 +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 1mmhsY-0003es-QI for pgsql-hackers@lists.postgresql.org; Mon, 15 Nov 2021 19:42:58 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mmhsV-0008FQ-8j for pgsql-hackers@lists.postgresql.org; Mon, 15 Nov 2021 19:42:58 +0000 Received: by mail-io1-xd34.google.com with SMTP id e144so22935783iof.3 for ; Mon, 15 Nov 2021 11:42:54 -0800 (PST) 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=lig2TgHW9jqavQe/gRScGzu+vuu8iS7N4LIOuI+JuI0=; b=z0pOFBcyMNITC+xUcVOck6pqiLg2x6A5TXWhEtBtQE9sqVf4NfnhQkkz2A8687ZRNI zRKOCqcExKAx8ccEBpXjB9xBIpvugjIP3SHan4LO6uy6kqL8Ex//NBeTYymSUCBbHjW7 2OkzQXLIjdOAzUvL+Bn30Rb9whHlWHVYSRPrzV2ykypKckkWOKQcFRhZleJirZZIXHYS MYYaJPeoR7HTqph8xFzFXGqMIsE7h9fmf2mWIsl5l/CaS3Kw9nbG768E7OHVDWcooZEZ Xbl6YAw/ZHpAChF5jOe9IvzlFdxJOhx/PIrEulSy0+RPhp0slnplItdTMmepj8psk3yP Vq0w== 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=lig2TgHW9jqavQe/gRScGzu+vuu8iS7N4LIOuI+JuI0=; b=h7rAK1IN9pkJ8GvHOBVNnecq3O1NRhndRCwdje84Zk9J9pFjI+vHa8laIQEZuiCBR9 hIiDx30n4pApfa+puYB90ZyTc1iSCQ0qPEl7In9Bhv7fc4ds286B4jgir2i1GwmtccPR zfTf4QMUwPqqwpIJduouuBpwxAdiorfOnV2atriiCdw7W9nw7sWgGH/wPCEWU0puqBim SUvE9p4tcu+G5q2EAea4qtn8D/rJyNVPRZWqZgsIRAB6S9KaBQG/ITmKhC1Fm38Az1Ad Osfure8uEJPIZihFA7qEUhsXnX+Zpbir7BtSzDg92p9YeQIlqoY9DKZ257x7BajzdsyK Pp1g== X-Gm-Message-State: AOAM530X+qet+0aw/04Ji/3lUTWXdN9pEl0S/YGRfW2SfPXlGvPanbno KSjnSR569pHhRQlOUndnT45N4g== X-Google-Smtp-Source: ABdhPJx3Ilnsp3+bp/Nb9WQF4YFPvJgQgvzB/yenRDqmuuTU2Mo2M/iwOhl9KYa+PNkQzAH3APZqWA== X-Received: by 2002:a5d:8451:: with SMTP id w17mr903273ior.139.1637005373073; Mon, 15 Nov 2021 11:42:53 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id y12sm11144608ill.71.2021.11.15.11.42.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Nov 2021 11:42:52 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 4F69A800C8E; Mon, 15 Nov 2021 13:42:51 -0600 (CST) Date: Mon, 15 Nov 2021 13:42:51 -0600 From: Justin Pryzby To: vignesh C Cc: Dilip Kumar , Bharath Rupireddy , Daniel Gustafsson , Robert Haas , Tom Lane , Andres Freund , Craig Ringer , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Subject: Re: Printing backtrace of postgres processes Message-ID: <20211115194251.GP17618@telsasoft.com> References: 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, Nov 15, 2021 at 09:12:49PM +0530, vignesh C wrote: > The idea here is to implement & expose pg_print_backtrace function, internally This patch is closely related to this one https://commitfest.postgresql.org/35/3142/ | Logging plan of the currently running query I suggest to review that patch and make sure there's nothing you could borrow. My only comment for now is that maybe the function name should be pg_log_backtrace() rather than pg_print_backtrace(), since it doesn't actually "print" the backtrace, but rather request the other backend to log its backtrace. Did you see that the windows build failed ? https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.153557 I think you'll need to create an "alternate" output like src/test/regress/expected/misc_functions_1.out It's possible that's best done by creating a totally new .sql and .out files added to src/test/regress/parallel_schedule - because otherwise, you'd have to duplicate the existing 300 lines of misc_fuctions.out. -- Justin