Re: BUG #18333: Postgres is crashing if we have special character in the query
От | Sujeet Swaminath |
---|---|
Тема | Re: BUG #18333: Postgres is crashing if we have special character in the query |
Дата | |
Msg-id | CABMBj-8B7B-zCBfn-iLv+1PS5O1k-xhyM+aXE1TwP-PphXn=zQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #18333: Postgres is crashing if we have special character in the query (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: BUG #18333: Postgres is crashing if we have special character in the query
|
Список | pgsql-bugs |
Hi Michael,
and to crash the postgres, you can use the below query.
Using the latest PostgreSQL 14 release version (14.11), I was able to reproduce this issue by executing the provided query, resulting in a crash. Attached are the crash dump and a sample database in tar format.
below is the login and the schema details that I have used,
create role badsql login password 'test123' createdb valid until 'infinity';
create database "TEST" with encoding='UTF8' connection limit=-1;
\c TEST
create schema badsql authorization badsql;
grant all on schema badsql to badsql;
alter user badsql set search_path = badsql;
alter user badsql with superuser;
and to crash the postgres, you can use the below query.
SELECT DISTINCT htest.test_code,htest.new_nr FROM htest LEFT OUTER JOIN ktest on htest.new_nr = ktest.test_nr and htest.test_ek%2=ktest.test_ek;
Note: soon after importing the DB it will not crash, you have to exit the psql session and start a new session, then within 5-10 execution of this query it should crash.
Thanks,
Sujeet
Sujeet
On Tue, Feb 6, 2024 at 5:32 AM Michael Paquier <michael@paquier.xyz> wrote:
On Mon, Feb 05, 2024 at 10:30:33AM +0000, PG Bug reporting form wrote:
> I have installed Postgres-14.10 and when executing the below query, the
> postgres crashes. but the same query work well with PostgreSQL-14-9.
> I have a crash dump, but not sure, how can I attach it here.
>
> 2024-02-05 06:08:53.936 GMT [1680576] LOG: server process (PID 2627861) was
> terminated by signal 11: Segmentation fault
> 2024-02-05 06:08:53.936 GMT [1680576] DETAIL: Failed process was running:
> SELECT DISTINCT badsql.id_code,badsql.id_nr FROM badsql LEFT OUTER JOIN
> newsql on badsql.id_nr = newsql.id_nr and badsql.vk_ek%2=newsql.ku_vk_ek;
It is going to be hard to say what's wrong without more details, like
a backtrace, or even better a self-contained SQL sequence that makes a
problem reproducible. 14.11 is planned for this week, so you may want
to give it a try and double-check if your problem is going away:
https://www.postgresql.org/developer/roadmap/
--
Michael
Вложения
В списке pgsql-bugs по дате отправления: