Skip to content

Conversation

@piercypixel
Copy link

@piercypixel piercypixel commented Apr 29, 2025

@piercypixel
Copy link
Author

This is my first contribution to postgres code. Can't figure out why I get segfaults for specific tests 🤔

@tristan957
Copy link
Member

tristan957 commented Apr 29, 2025

In you are getting segfaults, run the command you are using to test in a debugger:

lldb -- pg_dump ...
gdb --args pg_dump ...

And when it fails, enter the command bt. It'll tell you where the segfault actually occurs. From there it should be fairly simple to diagnose. If you're on a systemd based system, coredumpctl debug will also drop you in a debugger with the last coredump.

@piercypixel
Copy link
Author

Weird. There are no strlens in my diff at all 🤔

Core was generated by `./pg_dump --no-event-triggers -h localhost -U postgres -Ft -vvv --no-event-trig'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77
77      ../sysdeps/x86_64/multiarch/strlen-evex.S: No such file or directory.

@piercypixel piercypixel force-pushed the 27353-pg-dump-skip-event-triggers-v16 branch from a576391 to 082025e Compare April 30, 2025 18:18
@piercypixel piercypixel force-pushed the 27353-pg-dump-skip-event-triggers-v16 branch 2 times, most recently from 1a9c49d to a7505f8 Compare May 1, 2025 07:15
@piercypixel piercypixel force-pushed the 27353-pg-dump-skip-event-triggers-v16 branch from a7505f8 to 2a1ebf7 Compare May 1, 2025 07:28
@piercypixel
Copy link
Author

Ready to merge

@piercypixel piercypixel marked this pull request as ready for review May 1, 2025 07:32
@piercypixel piercypixel changed the title Skip event triggers in pg_dump Skip event triggers in pg_dump v16 May 1, 2025
@piercypixel piercypixel requested review from knizhnik and tristan957 May 1, 2025 09:18
@piercypixel piercypixel merged commit ca27513 into REL_16_STABLE_neon May 1, 2025
3 checks passed
@piercypixel piercypixel deleted the 27353-pg-dump-skip-event-triggers-v16 branch May 1, 2025 13:24
github-merge-queue bot pushed a commit to neondatabase/neon that referenced this pull request May 8, 2025
## Problem

Data import fails if the src db has any event triggers, because those
can only be restored by a superuser. Specifically imports from Heroku
and Supabase are guaranteed to fail.

Closes https://github.com/neondatabase/cloud/issues/27353

## Summary of changes

Depends on `pg_dump` patches per each supported PostgreSQL version:
- neondatabase/postgres#630
- neondatabase/postgres#629
- neondatabase/postgres#627
- neondatabase/postgres#628
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants