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

Segmentation fault when running DELETE statement #295

Closed
mrship opened this issue Feb 6, 2019 · 2 comments
Closed

Segmentation fault when running DELETE statement #295

mrship opened this issue Feb 6, 2019 · 2 comments
Labels

Comments

@mrship
Copy link

mrship commented Feb 6, 2019

Firstly, thanks for all your work on this FDW. We've just started exploring this and it is very promising for our needs. However, we've found a bug!

When executing a DELETE statement against a foreign table we're experiencing a segmentation fault on postgres. The statement is DELETE FROM table where (1=0) which runs fine on Oracle (and deletes nothing, as expected).

We can try avoiding this style of DELETE but I would not have expected it to cause a segmentation fault?

Here's the log from the server.

CET [13416] LOG:  server process (PID 14982) was terminated by signal 11: Segmentation fault
CET [13416] DETAIL:  Failed process was running: DELETE FROM "salesforce_impersonations" WHERE (1 = 0)
CET [13416] LOG:  terminating any other active server processes
WARNING CET [14974] WARNING:  terminating connection because of crash of another server process
CET [14974] 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.
CET [14974] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
CET [13416] LOG:  all server processes terminated; reinitializing 
admin@(none):admin> SELECT oracle_diag('admin');
+--------------------------------------------------------------------------------------------+
| oracle_diag                                                                                |
|--------------------------------------------------------------------------------------------|
| oracle_fdw 2.1.1devel, PostgreSQL 11.1, Oracle client 12.1.0.2.0, Oracle server 12.1.0.2.0 |
+--------------------------------------------------------------------------------------------+
SELECT 1
@laurenz laurenz added the bug label Feb 6, 2019
@laurenz laurenz closed this as completed in 9942356 Feb 6, 2019
@laurenz
Copy link
Owner

laurenz commented Feb 6, 2019

Embarrassing. Thanks for the report!

Could you check if that commit fixes the problem for you?

@mrship
Copy link
Author

mrship commented Feb 6, 2019

That worked!

admin> DELETE FROM salesforce_impersonations WHERE (1 = 0);
DELETE 0
Time: 0.127s

thanks for the quick turnaround.

Repository owner locked as resolved and limited conversation to collaborators May 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants