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.94.2) (envelope-from ) id 1uO3t0-00ENOo-Iq for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Jun 2025 00:27:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uO3sw-00FrlD-I5 for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Jun 2025 00:27:39 +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.94.2) (envelope-from ) id 1uO3sw-00Frl4-7V for pgsql-bugs@lists.postgresql.org; Sun, 08 Jun 2025 00:27:38 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uO3su-000pP8-1q for pgsql-bugs@lists.postgresql.org; Sun, 08 Jun 2025 00:27:37 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-60768e108baso3705160a12.2 for ; Sat, 07 Jun 2025 17:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1749342453; x=1749947253; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=kMkkLUEUEw+Ua/GZH0LL38N6Yokbp0BtUr/ZpG3d/Fk=; b=BOlZwcLjgEQeP095HJeQ02x+ziqdxO+gk/FvB/7jnq3fjP0rauIQMRCBjUhmyJEc7d SLWoTbS9b1L7EjNE1xBeWcoeCh83leLrRFtk0eWzK4Ltg7tCfTl/yA0lB3/O2HhnTkhN n7EW7DpYp29a/zdqnOEphVfigRXqB+zlsvNMzXDeX3O9v+JVDwOLFrfLxN5o94UkAz5t 4L6wADukWMtYG8tzbDRVJcdyKgppXf/5dwFZHJbU05pSdDKmG4oJ6/J3ad6q8oYoIRuk YnJ/ZHWFV+DPLBZPhu9iW5nB6LDNXOgu8+cJYcpwHdb+q/86amjkpakXyIGu/gXWwbl9 aCsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749342453; x=1749947253; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kMkkLUEUEw+Ua/GZH0LL38N6Yokbp0BtUr/ZpG3d/Fk=; b=ryaZVFopIGDA72TZnu5D7WMwLUlMJyXLaRcHE+yb54/IgsKivTvSFeDNT3CnSfzDJz FVuIn/SDsLn2FwyRZwocpgYdMStPzH44JpewHSVtzizdzd0Xi9Pb4AvErp0eSB48RExR Fnaso51jLLYNC+PuJw/P1Mmr8x+EIwFXZ5IHwvEx1OKANnex4OTNcGzfGi1pCy3jz+c4 Wllb9ooy4K/l+Uv+Dz2xdtuu2ax1qPdzsCTvIU8fc5w3lNWvFl29etq3l04VNIda3J4y gGv8KNrmmZkri83pnrWHqJ82GEF3EzQ+/m8VNYWVRhtKXy8s2zYGe2GxEZH4wD40ZjFz KuFQ== X-Forwarded-Encrypted: i=1; AJvYcCVQ3UxdlXHMjb8fOSTbo7owHceBdCcqu1HSwN7Coba4h0ONamkIT/tvlTpGhnW0nb987icDgAlZnA9D@lists.postgresql.org X-Gm-Message-State: AOJu0YyeTMXt/AsrdlMkrdVki6KTdf//mc1wzXEQ2s1Ugw/jyz4Kwnnm 4hZCFznkA2WOgSpoYNvClHpdF+ylGXay3cV6XMva2WhnBsPuFgd0SjAiBWdqEn77meIXfNyBHQP KJvv+ X-Gm-Gg: ASbGncu8vyY5IbZErfcYPOBX8788lMQDXqVx38n56w32aFqwl6+gDhUCv8DwHTAx/Z8 UMlxYdE/8kEffDO7ldfaad4NVmORoa1+nZ9dLAvao0++pv/FZTsertYJvtk5sRf2pCrrYgOiBHz w5SBfpRm6G4MyI/s2WDZtzqQLUux5YDEbzblG27d4d9Bkr4ub/9cnrpxHc8KpumfsK1YE8xrq+Y q3p6Z2uofFZBRFqy2g/KMw4U4ZefU6wQs3vP5gwBeYKo+VHBG0ejB+7ZxmlZOUleuuoJiOx5mEo yyehrQ8KTOqBMBPDvsoxZqp50zTVkB9pgxxt6rH/mUu+MCv0MNfCwidlNq7LdB3ato4BA3IISeR 6Y4Lb40tjvswi7d9e X-Google-Smtp-Source: AGHT+IGaJMHwiw8nWwTacMjNC4gU7iBqri302HuFkF+mmiHRfCvdmN61naVngwUPonweFjgGdjkV+A== X-Received: by 2002:a17:907:9407:b0:adb:469d:2246 with SMTP id a640c23a62f3a-ade1aa4d893mr735493266b.17.1749342452792; Sat, 07 Jun 2025 17:27:32 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:9dfc:de37:7fa5:32e9:e556]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ade1d753abfsm344023066b.19.2025.06.07.17.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Jun 2025 17:27:32 -0700 (PDT) Message-ID: Subject: Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17 From: Laurenz Albe To: lowell.hought@gmail.com, pgsql-bugs@lists.postgresql.org Date: Sun, 08 Jun 2025 02:27:31 +0200 In-Reply-To: <18950-010424f049268487@postgresql.org> References: <18950-010424f049268487@postgresql.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 2025-06-07 at 16:08 +0000, PG Bug reporting form wrote: > PostgreSQL version: 17.5 > Operating system: Red Hat Enterprise Linux release 8.10 (Ootpa) >=20 > A pgsql function that returns Table is relatively simple. It accepts two > arguments; a date and an interval. It uses these to arguments in a query > that returns a result set. This function worked in Postgresql 16.1 and > Postgresql 16.9. However, it does not work in versions 17.0 nor in 17.5 >=20 > [function definition] >=20 > This is the first time I have ever encountered a bug and so I have no > experience with reporting it. Your function essentially is running a query. If you run that query outside of the function, does it finish on time? If not, you have a simpler problem to tackle. It need not necessarily be a bug if some queries perform worse in a later PostgreSQL version. There are too many factors involved in the execution of a complicated query. To give help, we'd need at least the EXPLAIN output from the query and the EXPLAIN (ANALYZE, BUFFERS) output from the query on the old version. Yours, Laurenz Albe