Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
700 stars 145 forks source link

Multicorn95 binaries from pgdg is broken - SEGVs import foreign schema #127

Open t3rmin4t0r opened 8 years ago

t3rmin4t0r commented 8 years ago

The import schema routine seems to be off by 1.

(gdb) p *routine
$2 = {type = T_FdwRoutine, GetForeignRelSize = 0x7f6d3d74d370 <multicornGetForeignRelSize>, GetForeignPaths = 0x7f6d3d74d300 <multicornGetForeignPaths>, 
  GetForeignPlan = 0x7f6d3d74d9e0 <multicornGetForeignPlan>, BeginForeignScan = 0x7f6d3d74db30 <multicornBeginForeignScan>, IterateForeignScan = 0x7f6d3d74d220 <multicornIterateForeignScan>, 
  ReScanForeignScan = 0x7f6d3d74c640 <multicornReScanForeignScan>, EndForeignScan = 0x7f6d3d74c700 <multicornEndForeignScan>, GetForeignJoinPaths = 0x0, 
  AddForeignUpdateTargets = 0x7f6d3d74d090 <multicornAddForeignUpdateTargets>, PlanForeignModify = 0x7f6d3d74c680 <multicornPlanForeignModify>, 
  BeginForeignModify = 0x7f6d3d74cf40 <multicornBeginForeignModify>, ExecForeignInsert = 0x7f6d3d74ce80 <multicornExecForeignInsert>, ExecForeignUpdate = 0x7f6d3d74cc40 <multicornExecForeignUpdate>, 
  ExecForeignDelete = 0x7f6d3d74cd50 <multicornExecForeignDelete>, EndForeignModify = 0x7f6d3d74c690 <multicornEndForeignModify>, IsForeignRelUpdatable = 0x0, GetForeignRowMarkType = 0x0, 
  RefetchForeignRow = 0x0, RecheckForeignScan = 0x7f6d3d74c630 <multicornExplainForeignScan>, ExplainForeignScan = 0x0, ExplainForeignModify = 0x0, 
  AnalyzeForeignTable = 0x7f6d3d74c880 <multicornImportForeignSchema>, ImportForeignSchema = 0x0}
t3rmin4t0r commented 8 years ago

This is probably a mistake with the repo at http://yum.postgresql.org/srpms/9.5/redhat/rhel-7Server-x86_64/

I have rebuilt multicorn95 from 1.3.1 by doing "make release-zip", copy that .zip to ~/rpmbuild/SOURCES/ and changing the spec file version from 1.2.4 to 1.3.1.

Once, I did that the import schema actually works fine without a SEGV.

Hopefully this issue helps someone else who had issues with Multicorn from the PGDG repos.

rdunklau commented 8 years ago

Thank you for this report, I forwarded it to the PGDG yum repo maintainers:

http://www.postgresql.org/message-id/4723015.BWWRYRopiF@ronan.dunklau.fr