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 1oSnrR-0001Mp-TO for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Aug 2022 23:08:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oSnrQ-000225-4B for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Aug 2022 23:08:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSnrP-00021v-OT for pgsql-hackers@lists.postgresql.org; Mon, 29 Aug 2022 23:08:03 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oSnrN-0003bJ-7p for pgsql-hackers@postgresql.org; Mon, 29 Aug 2022 23:08:02 +0000 Received: by mail-pg1-x530.google.com with SMTP id 73so696851pga.1 for ; Mon, 29 Aug 2022 16:08:01 -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:cc:to:from:date:from:to:cc; bh=MCuajeE7MK1qayF/94aJ432jZr8MzQvpMM01ZUJHG3Q=; b=d7l29I2DUGfysrkX9HO1vbqaRKP13IECfHzu3gNVWO4AA6QBUR/zJNS65U3gNwD9lM /nUz0Hym1iRqc4w51cjZaPotoRw60wyqCH6PCgfkS7EBS1EAWcvTkoyb49tLxWayaFto Rl+0+Z+nIaRoVkD0wqKPN4AGvpOcm+a7I4b5ApIUQ6ba9EBAuyYlzkg/Zj3txZXLiJwb N6H9pxe78m7z2Xe1qeWU+qAxI1B7Vzmrfq5PEldCURJT+MUfIM7ymtqoe4EyF05ZQp9H LzwVqpFMxPT5aqTSvhCT06LVslSQob/MeHIGzJxy61jBHY6y8/+rjonWKrdAGc4jbtFW I0kg== 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:cc:to:from:date:x-gm-message-state:from:to:cc; bh=MCuajeE7MK1qayF/94aJ432jZr8MzQvpMM01ZUJHG3Q=; b=FJTXe+QuP5Z4p0Cvoa5j2CFejEyT4Wn8ep42eQtaQJdt4J2Okre4Kt6Vpx3MlwtirK BPwTfFO9VZ1oair/+99rs2rsTJBGWnGdXHHZcWFHO80D+do71dsG1GX9g5SnnlMoUz7V GC+j0P4uWIKk5mHegUmxtuJQnDH1VPodgIrIzc4dx4cDgd16+JvYdnqWf8mnuXaktL4F VHi7PclKkUuL9W52/k2oC2UAYdHbgMzlbgCrUEt6LXyLMB+SNJtSVzqLdYPZ6/FXdFJ4 JenOC8iB0xJStk7euj92vyDcJlCTdEI0+TNwvCTCN5dvKESQg1dgfm/ahja70jFHbys0 eE3A== X-Gm-Message-State: ACgBeo1VWizF1arM8+a+Kelqup7ZBZyi6MjbIMI087Dqzo5t3a/ykEOK RHHMLQjLA2+B67pp62QWhSqXObFsVrQ= X-Google-Smtp-Source: AA6agR4dCmkEE5ELHor0UEmUgwF+m/zmAjT/Noiz51AMR4Tg9QfxS26BTqw7vTtj/EI09p4eq4A7/g== X-Received: by 2002:a05:6a00:21c8:b0:52e:3404:eba5 with SMTP id t8-20020a056a0021c800b0052e3404eba5mr18926722pfj.67.1661814480321; Mon, 29 Aug 2022 16:08:00 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id k6-20020a170902ce0600b0015e8d4eb1dbsm8082624plg.37.2022.08.29.16.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 16:07:59 -0700 (PDT) Date: Mon, 29 Aug 2022 16:07:57 -0700 From: Nathan Bossart To: Greg Stark Cc: pgsql-hackers@postgresql.org Subject: Re: identifying the backend that owns a temporary schema Message-ID: <20220829230757.GA542616@nathanxps13> References: <20220815205811.GA250990@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Aug 23, 2022 at 10:29:05AM +0100, Greg Stark wrote: > Having this function would be great (I admit I never responded because > I never figured out if your suggestion was right or not:). But should > it also be added to the pg_stat_activity view? Perhaps even just in > the SQL view using the function. > > Alternately should pg_stat_activity show the actual temp schema name > instead of the id? I don't recall if it's visible outside the backend > but if it is, could pg_stat_activity show whether the temp schema is > actually attached or not? I'm open to adding the backend ID or the temp schema name to pg_stat_activity, but I wouldn't be surprised to learn that others aren't. It'd be great to hear a few more opinions on the idea before I spend too much time on the patches. IMO we should still adjust the pg_stat_get_backend_*() functions even if we do end up adjusting pg_stat_activity. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com