Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w62bh-003tAY-0j for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 08:31:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w62bf-008Ole-1s for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 08:31:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w62bf-008OlW-0P for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 08:31:51 +0000 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w62bd-00000001Hr3-0DrJ for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 08:31:50 +0000 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-50baafd6c4aso1083131cf.1 for ; Fri, 27 Mar 2026 01:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774600308; cv=none; d=google.com; s=arc-20240605; b=ltGH/87TB6+3JrfKUV0/7ZOLo1eM/iVRT2uckIlPlzkfF1h8gBFXGwkyKK/Kud3jk3 7M/z4E3CI0wXNH1aLeatT+4SsJutJWCLjl+LU1WDNRa/o+2BeNqZ0UBxjYpPOuLEG9K0 w4FfahhaOb+GgV9DwjKijufegPX/EayXik5G1Huu8Nn3YiMrSNbhrLlGQNLUIVssv+jU kcF8ffwu6D0l1MYo+MoGqx23Fue2zPOyOBTWy6hJZpt3hKyM5sxiFOvtvvCfoiU5Ey4i GM/MyXcOsqV2ZZmbAX5NoT/RL9/Ly/wFSuaExRK+N6LmaI05msuTnJNXorQlB8P9v8gL loOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hUj1j0Si2YDWhvMH8YU8eN/JzYPpAnhErDfyjE+x9Rs=; fh=PYnIYeosBSSdr/GV+fHMWov406KDNVPib3WYHYEVSfQ=; b=YUBbdBTQAOP72DHTTxIhVNSxA8UGFnRculokk8+NdpPC/iVq4QSE/zWQTvSWG1dJFw etmwkBWMwTWanx6J67IWwk8Pvkub0OGyoOe5ruyxhqp3yuvWHU9mU5w/l0+pWImyudOm 8YUdP0G+s3/aSXtgEQrjbnxioESqiM1HZ5YNJo0o5ox/ydr9gWysTsUEWvi95PvOqjaX WUK099NA1QbP+CJK0F4uDlb+30sw56Bg3Uiq0TveqCQvCg4ReZRd07t357MDHCm9VbfQ Y7VzXAA12POcCsDifA+ug0otBkIARcSnpynZVxxmETK0BQSr5s8+J4m9g6oB9xvTLlMS TUMQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fittl.com; s=google; t=1774600308; x=1775205108; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hUj1j0Si2YDWhvMH8YU8eN/JzYPpAnhErDfyjE+x9Rs=; b=OlPWuSHZ5abC+4MUbhNSMydWSvoL2L/PaTaZqMjB/ts7qzu+v3s7/zzm2GSGCvHw0Z iVK8xv4c+29am1nvgyyy0sioJvtGG5SH5UCtbuen7T5MCviEpDnpwUuwhcQLNeUwnr2N mgEXgO7uInThXTRGiPFFJU5MTkYJGKyJmuxKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774600308; x=1775205108; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hUj1j0Si2YDWhvMH8YU8eN/JzYPpAnhErDfyjE+x9Rs=; b=M1epSlUxk1Dh0nke1AskoB9GUaGK8782Cy3roj9Ar9s7mUgvYhYAw2BPPouHkMt6AI 5eJgqrRrzPS3BYg1cZNTRn0Z8CYThRLn6aFOjQEVMJH1lzzAcne5xIKVsmf+J6QBxTVW +lsEYtAoEJFjFf2ZmAPrlI1enA1uXS7uQRZZPP9VjE4yQqXm+FRovFv9ihHLVvzurmap HoYiLcnhojGmksPyRvT6caSZYPIEGoi0NXJ40W4lmeq7WJzff/CdfZEoN3rGlybKdFk7 tZSXgdSVr9yfytwBnQAQFC4XN2fHbDsS6ZOJ9CoOhyw6nD2AqtbNAvMXIjAV71dZKkbi /MtQ== X-Forwarded-Encrypted: i=1; AJvYcCVbi3EZpemIqCjMDbzWy8SoVuQjcoO4kl3No7U6PXCj5lH7GI49zWW1QNpmMEC8KkmE1lK+jbarFWSKW7yF@lists.postgresql.org X-Gm-Message-State: AOJu0YzBixna29eMclWDhrqOmO3iJUYi5SjF2UpjnKmFiv6aRe1UuZGV fDbVa6+DWboruQkBWoFIOHpwt+cD56zUQw10sYxxMgCF7YZ4AplQdaO4AfQL4x6xrYS3GcqZteV AAKcnshMpHkBW9/GlrhVNnM/U1JuHRUU6HToxi+QR X-Gm-Gg: ATEYQzwPonS+im5uw/RfKirWk8soPqEtXF12s+8u/v+59wREBmTmempHyjH6XwlOPAZ 7qERMyawRQC9ldlsDJrYrbudBJeJ03w7hyOMiSRkFgpuUR7lXjiKBAfT+U+p26bTem6pT0KBnBa L4dwHE7xaGs8xPeCgCOW95rLoAp1eOBBnaIchejZFROpTHze5Unj0WMI9Vh8vlk/1Uo11im63vg Z2bqv95sEM+hQXnTEnJfqitj197eYWDLsp2U9fx3c8gMuVwDhKgekH+8e545OH2Fv4doU1IdQED x4hPPX+sNoaQ8w0VPnBODwmjAy9jMgysfDndW1xWLMtQbRSM9Hg= X-Received: by 2002:a05:622a:5c8d:b0:50b:465f:706c with SMTP id d75a77b69052e-50ba39820f6mr20060221cf.60.1774600308088; Fri, 27 Mar 2026 01:31:48 -0700 (PDT) MIME-Version: 1.0 References: <1136161.1769654478@sss.pgh.pa.us> <1299934.1773938807@sss.pgh.pa.us> In-Reply-To: From: Lukas Fittl Date: Fri, 27 Mar 2026 01:31:11 -0700 X-Gm-Features: AQROBzBEHC3ajO8u4GWN7p9wExH1ReBafiEHAwOnc3xyBn4ubWOpwZrMkU36oKs Message-ID: Subject: Re: pg_plan_advice To: Jakub Wartak , Robert Haas Cc: Tom Lane , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 27, 2026 at 1:00=E2=80=AFAM Jakub Wartak wrote: > > On Thu, Mar 26, 2026 at 6:20=E2=80=AFPM Robert Haas wrote: > >[..v23] > > 0003: please be the judge here, as I'm not sure. Isn't there some too hig= h > concurrency hit in pg_get_collected_shared_advice? If I do I've been thinking more about 0003 (pg_collect_advice) today, and I'm getting increasingly skeptical that we should try to get that into 19. It just feels like there is more design work to be done here, and I don't see the pressing need to have this in place. Instead, I wonder if we should just add a "debug_log_plan_advice" setting to pg_plan_advice, that always logs the plan advice when enabled. Basically like "always_store_advice_details", but emit a log line in addition to doing the work. That could either be enabled on a single session with a sufficiently high client_min_messages to consume it directly, or written to the log for a few minutes when trying to capture production activity (on small production systems where the logging overhead is acceptable). I don't see a log-based approach be less useful than the shared memory approach, because I think our aggregation design here is not right yet (and doesn't scale to production traffic), and so we might as well have the community try out some things with the log output instead. For the other one 0004 (pg_stash_advice) I feel its worth trying to get it in, if we can figure out the remaining issues. I'll try to do another pass on that tomorrow after some sleep. Thanks, Lukas --=20 Lukas Fittl