Re: ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Tom Lane
Luca Ferrari writes: > On Wed, Mar 12, 2025 at 12:54 PM Artur Zakirov wrote: >> In your case `base/357283/365810` file is a new index file. For some >> reason Postgres tries to read the new index. I suppose this is because >> during reading the table `t` within the function `f_t` it tries to >> a

Re: ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Achilleas Mantzios - cloud
On 3/12/25 14:31, Luca Ferrari wrote: On Wed, Mar 12, 2025 at 12:54 PM Artur Zakirov wrote: I can reproduce this with the table `t` on PG 15.10. I didn't mention I'm running 16.6, but I'm pretty sure it is reproducible on other versions too. In your case `base/357283/365810` file is a new in

Re: ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Luca Ferrari
On Wed, Mar 12, 2025 at 12:54 PM Artur Zakirov wrote: > > I can reproduce this with the table `t` on PG 15.10. I didn't mention I'm running 16.6, but I'm pretty sure it is reproducible on other versions too. > > In your case `base/357283/365810` file is a new index file. For some > reason Postgr

Re: ERROR: could not read block 0 in file when creating an index out of a function

2025-03-12 Thread Artur Zakirov
Hey, On Wed, 12 Mar 2025 at 10:11, Luca Ferrari wrote: > Now, according to the documentation, the function f_t is immutable > since it is not modifying the database, so what is going on? And why > is the same function working if the table has not the constraint on > the column? I can reproduce t