public inbox for [email protected]  
help / color / mirror / Atom feed
pg_upgrade from 18beta1 -> 18beta3 - problem with btree_gist contrib module / extension
5+ messages / 4 participants
[nested] [flat]

* pg_upgrade from 18beta1 -> 18beta3 - problem with btree_gist contrib module / extension
@ 2025-08-20 12:50  Achilleas Mantzios <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Achilleas Mantzios @ 2025-08-20 12:50 UTC (permalink / raw)
  To: [email protected] <[email protected]>

pg_restore: from TOC entry 4295; 1255 596569951 FUNCTION 
gist_stratnum_btree(integer) postgres
pg_restore: error: could not execute query: ERROR:  could not find 
function "gist_stratnum_btree" in file "/usr/local/pgsql/lib/btree_gist.so"
Command was: CREATE FUNCTION "public"."gist_stratnum_btree"(integer) 
RETURNS smallint
    LANGUAGE "c" IMMUTABLE STRICT PARALLEL SAFE
    AS '$libdir/btree_gist', 'gist_stratnum_btree';


The solution was to somehow restart 18beta1, drop btree_gist and all its 
dependent constraints / indexes / objects , pg_upgrade and finally 
re-create extension and dependent objects.


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pg_upgrade from 18beta1 -> 18beta3 - problem with btree_gist contrib module / extension
@ 2025-08-20 14:39  Adrian Klaver <[email protected]>
  parent: Achilleas Mantzios <[email protected]>
  0 siblings, 2 replies; 5+ messages in thread

From: Adrian Klaver @ 2025-08-20 14:39 UTC (permalink / raw)
  To: Achilleas Mantzios <[email protected]>; [email protected] <[email protected]>

On 8/20/25 05:50, Achilleas Mantzios wrote:
> pg_restore: from TOC entry 4295; 1255 596569951 FUNCTION 
> gist_stratnum_btree(integer) postgres
> pg_restore: error: could not execute query: ERROR:  could not find 
> function "gist_stratnum_btree" in file "/usr/local/pgsql/lib/btree_gist.so"
> Command was: CREATE FUNCTION "public"."gist_stratnum_btree"(integer) 
> RETURNS smallint
>     LANGUAGE "c" IMMUTABLE STRICT PARALLEL SAFE
>     AS '$libdir/btree_gist', 'gist_stratnum_btree';

I can not find gist_stratnum_btree in:

https://www.postgresql.org/docs/18/btree-gist.html

or in the source.

How did it end up in the database?

> 
> 
> The solution was to somehow restart 18beta1, drop btree_gist and all its 
> dependent constraints / indexes / objects , pg_upgrade and finally re- 
> create extension and dependent objects.
> 

Something more then DROP EXTENSION/CREATE EXTENSION btree_gist?


-- 
Adrian Klaver
[email protected]






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pg_upgrade from 18beta1 -> 18beta3 - problem with btree_gist contrib module / extension
@ 2025-08-20 14:49  Paul A Jungwirth <[email protected]>
  parent: Adrian Klaver <[email protected]>
  1 sibling, 1 reply; 5+ messages in thread

From: Paul A Jungwirth @ 2025-08-20 14:49 UTC (permalink / raw)
  To: Adrian Klaver <[email protected]>; +Cc: Achilleas Mantzios <[email protected]>; [email protected] <[email protected]>

On Wed, Aug 20, 2025 at 9:39 AM Adrian Klaver <[email protected]> wrote:
>
> On 8/20/25 05:50, Achilleas Mantzios wrote:
> > pg_restore: from TOC entry 4295; 1255 596569951 FUNCTION
> > gist_stratnum_btree(integer) postgres
> > pg_restore: error: could not execute query: ERROR:  could not find
> > function "gist_stratnum_btree" in file "/usr/local/pgsql/lib/btree_gist.so"
> > Command was: CREATE FUNCTION "public"."gist_stratnum_btree"(integer)
> > RETURNS smallint
> >     LANGUAGE "c" IMMUTABLE STRICT PARALLEL SAFE
> >     AS '$libdir/btree_gist', 'gist_stratnum_btree';
>
> I can not find gist_stratnum_btree in:
>
> https://www.postgresql.org/docs/18/btree-gist.html
>
> or in the source.
>
> How did it end up in the database?

gist_stratnum_btree was in beta1 but was renamed to
gist_translate_cmptype_btree by
32edf732e8dc9eb3e7a923aeb67d49246744a20a.

> > The solution was to somehow restart 18beta1, drop btree_gist and all its
> > dependent constraints / indexes / objects , pg_upgrade and finally re-
> > create extension and dependent objects.
>
> Something more then DROP EXTENSION/CREATE EXTENSION btree_gist?

That seems like the easiest fix to me. But if you've built indexes
based on those opclasses then more work is required, as here.

I don't know what pg_upgrade tries to support for moving from one beta
release to another. Is this something we should try to fix?

Yours,

-- 
Paul              ~{:-)
[email protected]






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pg_upgrade from 18beta1 -> 18beta3 - problem with btree_gist contrib module / extension
@ 2025-08-20 14:56  Tom Lane <[email protected]>
  parent: Adrian Klaver <[email protected]>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2025-08-20 14:56 UTC (permalink / raw)
  To: Adrian Klaver <[email protected]>; +Cc: Achilleas Mantzios <[email protected]>; [email protected] <[email protected]>

Adrian Klaver <[email protected]> writes:
> I can not find gist_stratnum_btree in:
> https://www.postgresql.org/docs/18/btree-gist.html
> or in the source.
> How did it end up in the database?

See commit 32edf732e.  Perhaps that renaming should not have been done
post-beta1, but that's where we are.

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pg_upgrade from 18beta1 -> 18beta3 - problem with btree_gist contrib module / extension
@ 2025-08-20 14:58  Tom Lane <[email protected]>
  parent: Paul A Jungwirth <[email protected]>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2025-08-20 14:58 UTC (permalink / raw)
  To: Paul A Jungwirth <[email protected]>; +Cc: Adrian Klaver <[email protected]>; Achilleas Mantzios <[email protected]>; [email protected] <[email protected]>

Paul A Jungwirth <[email protected]> writes:
> I don't know what pg_upgrade tries to support for moving from one beta
> release to another. Is this something we should try to fix?

It's water over the dam now, I think.  If we had such a breakage
between officially-released versions, that would be bad enough to
justify jumping through hoops.  But beta releases have always been
"use at your own risk".

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2025-08-20 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-08-20 12:50 pg_upgrade from 18beta1 -> 18beta3 - problem with btree_gist contrib module / extension Achilleas Mantzios <[email protected]>
2025-08-20 14:39 ` Adrian Klaver <[email protected]>
2025-08-20 14:49   ` Paul A Jungwirth <[email protected]>
2025-08-20 14:58     ` Tom Lane <[email protected]>
2025-08-20 14:56   ` Tom Lane <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox