Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: unrecognized tag: 127 on seemingly zombodb unrelated query #634

Closed
mathroc opened this issue Feb 20, 2021 · 1 comment
Closed

Comments

@mathroc
Copy link
Contributor

mathroc commented Feb 20, 2021

ZomboDB version: 3000.0.0-alpha4 (ed34888) --release
Postgres version: PostgreSQL 13.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit
Elasticsearch version: 7.10.1

Problem Description:

a function I’m using is producing a warning when the extension is installed. It’s still working just fine as far as I can tell but there’s this annoying warning in the database logs

Error Message (if any):

WARNING:  unrecognized tag: 127

reproducing in psql after starting a brand new postgres server:

psql (13.2)
Type "help" for help.

postgres=#
postgres=# create table f (id int, name text);
CREATE TABLE
postgres=#
postgres=# insert into f (id, name) values (1, 'test');
INSERT 0 1
postgres=#
postgres=# create table u as select * from f;
SELECT 1
postgres=#
postgres=#
postgres=# CREATE TABLE j (
postgres(#     name character varying(255) NOT NULL
postgres(# );
CREATE TABLE
postgres=#
postgres=# CREATE TYPE public.t AS (
postgres(# name text,
postgres(# jobs text[]
postgres(# );
CREATE TYPE
postgres=#
postgres=# select row(
postgres(#         (select 'test' from u where u.id = f.id)::text,
postgres(#         array(
postgres(#             select name
postgres(#             from j
postgres(#             where false
postgres(#         )
postgres(#     )::public.t
postgres-# FROM f
postgres-# where id = 1;
    row
-----------
 (test,{})
(1 row)

postgres=#
postgres=# create extension zombodb;
CREATE EXTENSION
postgres=#
postgres=# select row(
postgres(#         (select 'test' from u where u.id = f.id)::text,
postgres(#         array(
postgres(#             select name
postgres(#             from j
postgres(#             where false
postgres(#         )
postgres(#     )::public.t
postgres-# FROM f
postgres-# where id = 1;
WARNING:  unrecognized tag: 127
    row
-----------
 (test,{})
(1 row)

postgres=#

we can see that the query produces a warning only after installing the extension

here is the SQL without the output:

create table f (id int, name text);
insert into f (id, name) values (1, 'test');
create table u as select * from f;

create table j (
    name character varying(255) not null
);

create type public.t as (
    name text,
    jobs text[]
);

select row(
    (select 'test' from u where u.id = f.id)::text,
    array(
        select name
        from j
        where false
    )
)::public.t
from f
where id = 1;

create extension zombodb;

select row(
    (select 'test' from u where u.id = f.id)::text,
    array(
        select name
        from j
        where false
    )
)::public.t
from f
where id = 1;

I have no clue why that’s happening. I kinda suppose this zombodb related, or could it be a bug in postgres ? or I’m missing something obvious — this has happened before... —

@eeeebbbbrrrr
Copy link
Collaborator

eeeebbbbrrrr commented Feb 22, 2021

It's zombodb-related. It's not really an issue, just means that ZDB's planner hook, which walks the plan tree looking for ZDB-specific things, didn't recognize whatever node 127 is -- which appears to be a "ArrayCoerceExpr" node in Postgres 13.

I'll support walking this node and then I'll move that warning to the debug1 level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants