cyga / www_fdw

fdw extension for postgres
http://wiki.postgresql.org/wiki/WWW_FDW
123 stars 21 forks source link

Segmentation Fault #34

Open HogeBlekker opened 7 years ago

HogeBlekker commented 7 years ago

System: Debian Jessie 8.5.1 PostgreSQL 9.2 (as per https://www.postgresql.org/download/linux/debian/)

sudo -u postgres psql

Then, what should be a really simple example:

postgres=#
DROP EXTENSION IF EXISTS www_fdw CASCADE;
CREATE EXTENSION www_fdw;
CREATE SERVER www_service FOREIGN DATA WRAPPER www_fdw OPTIONS (uri 'http://api.ipify.org');
CREATE USER MAPPING FOR current_user SERVER www_service;
CREATE FOREIGN TABLE ips (ip text) SERVER www_service;
SELECT ip FROM ips;
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.
!> \q

Logfile:

LOG:  server process (PID 16079) was terminated by signal 11: Segmentation fault
DETAIL:  Failed process was running: SELECT ip FROM ips;
LOG:  terminating any other active server processes
WARNING:  terminating connection because of crash of another server process
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.
HINT:  In a moment you should be able to reconnect to the database and repeat your command.
LOG:  all server processes terminated; reinitializing
LOG:  database system was interrupted; last known up at 2017-02-27 12:56:40 GMT
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  redo starts at 0/17BAA38
LOG:  record with zero length at 0/17D17E0
LOG:  redo done at 0/17D17B0
LOG:  last completed transaction was at log time 2017-02-27 12:57:29.730642+00
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

Seems to be linked with #28?

calz1 commented 7 years ago

I'm getting a similar problem though different error. I was able to successfully install and create the extension. I then created the Wikipedia example. When I run this:

select * from www_fdw_wiki where search='postgres' limit 1;

I get this in my DB client (Squirrel):

An I/O error occured while sending ot the backend. SQLState: 08006 ErrorCode: 0

Then I run:

tail postgresql-9.5-main.log

and it appears the server died:

2017-02-27 11:57:32 EST [17366-3] 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.
2017-02-27 11:57:32 EST [17366-4] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2017-02-27 11:57:32 EST [1345-15] LOG:  all server processes terminated; reinitializing
2017-02-27 11:57:32 EST [17393-1] LOG:  database system was interrupted; last known up at 2017-02-27 11:52:53 EST
2017-02-27 11:57:32 EST [17393-2] LOG:  database system was not properly shut down; automatic recovery in progress
2017-02-27 11:57:33 EST [17393-3] LOG:  invalid record length at 0/791DC50
2017-02-27 11:57:33 EST [17393-4] LOG:  redo is not required
2017-02-27 11:57:33 EST [17393-5] LOG:  MultiXact member wraparound protections are now enabled
2017-02-27 11:57:33 EST [1345-16] LOG:  database system is ready to accept connections