supabase / postgres

Unmodified Postgres with some useful plugins
https://supabase.com
PostgreSQL License
1.35k stars 136 forks source link

vector extension did not work correctly #934

Closed zhaojunfeng closed 1 month ago

zhaojunfeng commented 5 months ago

Bug report

Describe the bug

vector extension did not work correctly, when I exec query :select '[0,0.4345234,0.3434]'<=>'[0,0.234324,0.23123]', respond with error msg 'Error: Connection terminated unexpectedly'.

select '[0,0.4345234,0.3434]'<=>'[0,0.234324,0.23123]' 2024-04-04T06:22:07.952635613Z 2024-04-04T06:22:07.952673563Z 2024-04-04 06:22:07.952 UTC [10] LOG: terminating any other active server processes 2024-04-04T06:22:07.956696604Z 2024-04-04 06:22:07.956 UTC [10] LOG: all server processes terminated; reinitializing 2024-04-04T06:22:08.120490768Z 2024-04-04 06:22:08.120 UTC [7479] LOG: database system was interrupted; last known up at 2024-04-04 03:42:01 UTC 2024-04-04T06:22:08.121614013Z 192.168.240.7 2024-04-04 06:22:08.121 UTC [7482] authenticator@postgres FATAL: the database system is in recovery mode 2024-04-04T06:22:08.122010281Z 192.168.240.7 2024-04-04 06:22:08.121 UTC [7483] authenticator@postgres FATAL: the database system is in recovery mode 2024-04-04T06:22:08.122262572Z 192.168.240.8 2024-04-04 06:22:08.122 UTC [7484] supabase_storage_admin@postgres FATAL: the database system is in recovery mode 2024-04-04T06:22:08.202609044Z 2024-04-04 06:22:08.202 UTC [7479] LOG: database system was not properly shut down; automatic recovery in progress

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

exec query 'select '[0,0.4345234,0.3434]'<=>'[0,0.234324,0.23123]' in supabase 'SQL Editor'.

1712213376385

Expected behavior

return correct result

System information

Additional context

init with pgvector 0.51

1712213726262

olirice commented 1 month ago

I was not able to reproduce this on 15.1.1.86

Could you please confirm the issue is still present for you by running

docker run -it --name supag -p 5535:5432 -d -e POSTGRES_DB=postgres -e POSTGRES_PASSWORD=local_pw -e POSTGRES_USER=postgres -d supabase/postgres:15.1.1.86

to spin up a local instance of supabase in docker and then connecting and executing your repro step

select '[0,0.4345234,0.3434]'<=>'[0,0.234324,0.23123]'

and let me know how that goes?

zhaojunfeng commented 1 month ago

In ubantu, it is correct. In centos 7.9, it happed

olirice commented 1 month ago

Do you mean that running via docker in centos 7.9 produces the problem, or something else?

olirice commented 1 month ago

Being tracked upstream Here https://github.com/pgvector/pgvector/issues/389 and even further upstream https://redmine.postgresql.org/issues/7920

Closing here