pg-redis-fdw / redis_fdw

A PostgreSQL foreign data wrapper for Redis
494 stars 68 forks source link

Postgresql 11.3 crashed on CREATE EXTENSION redis_fdw compiled with DEBUG #26

Open genevbj opened 5 years ago

genevbj commented 5 years ago

I've faced some strange behavior of redis_fdw inside postgres transaction so I decided to look deeper and make redis_fdw module with '#define DEBUG'

Then I run =# drop extension redis_fdw cascade; NOTICE: drop cascades to 5 other objects DETAIL: drop cascades to server redis_m0 drop cascades to user mapping for qp_kg_user on server redis_m0 drop cascades to user mapping for public on server redis_m0 drop cascades to foreign table redis_regions_future_reserve drop cascades to foreign table redis_regions_reserve DROP EXTENSION

And try to create debugger version

qp_kg=# create extension redis_fdw;

After few minutes of waiting client was aborted connection with message

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: Succeeded.

Database switched to recovery mode

2019-09-09 14:20:47 +06 [91660]: [16-1]:LOG: server process (PID 94608) was terminated by signal 11: Segmentation fault 2019-09-09 14:20:47 +06 [91660]: [17-1]:DETAIL: Failed process was running: create extension redis_fdw; 2019-09-09 14:20:47 +06 [91660]: [18-1]:LOG: terminating any other active server processes

2019-09-09 14:22:17 +06 [91660]: [21-1]:LOG: received fast shutdown request 2019-09-09 14:22:18 +06 [91660]: [22-1]:LOG: abnormal database system shutdown 2019-09-09 14:22:18 +06 [91660]: [23-1]:LOG: database system is shut down

2019-09-09 14:22:21 +06 [87363]: [1-1]:LOG: database system was interrupted while in recovery at 2019-09-09 14:21:00 +06 2019-09-09 14:22:21 +06 [87363]: [2-1]:HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery.

adunstan commented 3 years ago

I'm going to need better test for this. The regression tests pass quite happily with DEBUG defined.