Обсуждение: Reg: connection is getting closed when doing select count(*)

Поиск
Список
Период
Сортировка

Reg: connection is getting closed when doing select count(*)

От
Raj kumar
Дата:
I have installed Postgres12 in my Macbook. I have loaded data into the database using pgbench. When I try to execute the command below, I am not getting the output. Instead, connection is getting closed. Command and errors are written below.

More Information:
I am the only one using the database with default parameters in postgresql.conf.

Command:
(base) FVFZF06NNY1J:data rkuma803$ psql -U rkuma803 -d postgres
psql (12.2)
Type "help" for help.

postgres=# \c pgbench
You are now connected to database "pgbench" as user "rkuma803".
pgbench=# select count(*) from pgbench_accounts;                                                                       server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>
!> ^D\q
(base)

Error from DB logs,
2020-03-03 14:59:20.868 IST [51374] STATEMENT:  select count(*) from pgbench_accounts;
2020-03-03 14:59:25.852 IST [51363] LOG:  server process (PID 51386) was terminated by signal 9: Killed: 9
2020-03-03 14:59:25.852 IST [51363] DETAIL:  Failed process was running: select count(*) from pgbench_accounts;
2020-03-03 14:59:25.852 IST [51363] LOG:  terminating any other active server processes
2020-03-03 14:59:25.854 IST [51369] WARNING:  terminating connection because of crash of another server process
2020-03-03 14:59:25.854 IST [51369] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2020-03-03 14:59:25.854 IST [51369] HINT:  In a moment you should be able to reconnect to the database and repeat your command.

Re: Reg: connection is getting closed when doing select count(*)

От
Tom Lane
Дата:
Raj kumar <rajkumar820999@gmail.com> writes:
> *I have installed Postgres12 in my Macbook. I have loaded data into the
> database using pgbench. When I try to execute the command below, I am not
> getting the output. Instead, connection is getting closed. Command and
> errors are written below.*

> 2020-03-03 14:59:20.868 IST [51374] STATEMENT:  select count(*) from
> pgbench_accounts;
> 2020-03-03 14:59:25.852 IST [51363] LOG:  server process (PID 51386) was
> terminated by signal 9: Killed: 9

Signal 9 is pretty unusual.  I'm going to guess that you used EDB's
installer and the problem is with JIT compilation ... does
"set jit = off" fix it?  If so, that's a known bug that's being
worked on, see

https://www.postgresql.org/message-id/CA%2BOCxoz0bWi%2BR2WpocfkD20Lgrg69z1jQ_SZd-zmdzHW0zt%2Bbg%40mail.gmail.com

            regards, tom lane



Re: Reg: connection is getting closed when doing select count(*)

От
Raj kumar
Дата:
Hi Tom,

Your guess is correct. I did installation using EDB's installer. After turning off JIT, the query works as expected, attached the screenshot.
Can I expect same issue if I run on Linux server or with other installation methods? Any suggestions would be great.

Thanks for troubleshooting.

Thanks ,
Raj

On Tue, Mar 3, 2020 at 8:13 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Raj kumar <rajkumar820999@gmail.com> writes:
> *I have installed Postgres12 in my Macbook. I have loaded data into the
> database using pgbench. When I try to execute the command below, I am not
> getting the output. Instead, connection is getting closed. Command and
> errors are written below.*

> 2020-03-03 14:59:20.868 IST [51374] STATEMENT:  select count(*) from
> pgbench_accounts;
> 2020-03-03 14:59:25.852 IST [51363] LOG:  server process (PID 51386) was
> terminated by signal 9: Killed: 9

Signal 9 is pretty unusual.  I'm going to guess that you used EDB's
installer and the problem is with JIT compilation ... does
"set jit = off" fix it?  If so, that's a known bug that's being
worked on, see

https://www.postgresql.org/message-id/CA%2BOCxoz0bWi%2BR2WpocfkD20Lgrg69z1jQ_SZd-zmdzHW0zt%2Bbg%40mail.gmail.com

                        regards, tom lane
Вложения