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

Postgres crashing on inserting data with generate_series #98

Open
ritwizsinha opened this issue Jan 19, 2025 · 1 comment
Open

Postgres crashing on inserting data with generate_series #98

ritwizsinha opened this issue Jan 19, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ritwizsinha
Copy link

What happens?

Client crashes on using generate_series

To Reproduce

 create table test_table (id Integer, data TEXT) using columnstore;
 insert into test_table(id, data) select id, 'Test data' || id from generate_series(1, 10000) as id;

Crash

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: 2025-01-19 21:07:00.512 IST [214496] LOG:  server process (PID 274158) was terminated by signal 11: Segmentation fault
2025-01-19 21:07:00.512 IST [214496] DETAIL:  Failed process was running: insert into test_table(id, data) select id, 'Test data' || id from generate_series(1, 10000) as id;
2025-01-19 21:07:00.512 IST [214496] LOG:  terminating any other active server processes
2025-01-19 21:07:00.515 IST [274310] FATAL:  the database system is in recovery mode
Failed.
The connection to the server was lost. Attempting reset: Failed.
!?> 2025-01-19 21:07:00.517 IST [214496] LOG:  all server processes terminated; reinitializing
2025-01-19 21:07:00.540 IST [274311] LOG:  database system was interrupted; last known up at 2025-01-19 21:05:15 IST
2025-01-19 21:07:00.715 IST [274311] LOG:  database system was not properly shut down; automatic recovery in progress
2025-01-19 21:07:00.717 IST [274311] LOG:  redo starts at 0/32F3CB8
2025-01-19 21:07:00.717 IST [274311] LOG:  invalid record length at 0/32F3CF0: expected at least 24, got 0
2025-01-19 21:07:00.717 IST [274311] LOG:  redo done at 0/32F3CB8 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2025-01-19 21:07:00.721 IST [274312] LOG:  checkpoint starting: end-of-recovery immediate wait
2025-01-19 21:07:00.730 IST [274312] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.003 s, sync=0.002 s, total=0.011 s; sync files=2, longest=0.002 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/32F3CF0, redo lsn=0/32F3CF0
2025-01-19 21:07:00.735 IST [214496] LOG:  database system is ready to accept connections

OS:

Linux

pg_mooncake Version:

edf716e

Postgres Version:

16

Are you using pg_mooncake Docker, Neon, or the extension standalone?

pg_mooncake Docker Image

@ritwizsinha ritwizsinha added the bug Something isn't working label Jan 19, 2025
@dpxcc
Copy link
Contributor

dpxcc commented Jan 20, 2025

Are you sure that you’re testing on the main branch rather than on your own draft? #78

Because I couldn't reproduce the issue on v0.1.0 Docker image

cheng@Chengs-MacBook-Pro duckdb % docker run --name mooncake-demo -e POSTGRES_HOST_AUTH_METHOD=trust -d mooncakelabs/pg_mooncake
da9d0c09f60c91a4a3a53818317bd0e7e58964e4dad3d8bd801a5154e77f3583
cheng@Chengs-MacBook-Pro duckdb % docker run -it --rm --link mooncake-demo:postgres mooncakelabs/pg_mooncake psql -h postgres -U postgres
psql (17.2 (Debian 17.2-1.pgdg120+1))
Type "help" for help.

postgres=# CREATE EXTENSION pg_mooncake;
CREATE EXTENSION
postgres=# create table test_table (id Integer, data TEXT) using columnstore;
CREATE TABLE
postgres=# insert into test_table(id, data) select id, 'Test data' || id from generate_series(1, 10000) as id;
INSERT 0 10000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants