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

Sequence values are not set on greenmask restore #255

Closed
benregn opened this issue Jan 31, 2025 · 3 comments · Fixed by #256
Closed

Sequence values are not set on greenmask restore #255

benregn opened this issue Jan 31, 2025 · 3 comments · Fixed by #256
Assignees
Labels
bug Something isn't working

Comments

@benregn
Copy link

benregn commented Jan 31, 2025

Hey,

Thank you for your work on this tool!

When I restore a dump to my local database, all sequences for all tables are set to start value of 1.

I restored a Greenmask dump into a file (using pg_restore --file=1738263512345.sql greenmask_local_storage/1738263512345) and then grep that file (cat 1738263512345.sql | grep -i 'pg_catalog\.setval'). I noticed that all the SELECT pg_catalog.setval('"public"."my_table_id_seq"', 1234567, true) statements don't have semicolons at the end. All other statements in that file do have a semicolon at the end.

I also did a manual dump in a directory format leaving other settings to default and then repeated the above steps. The pg_catalog.setval statements in that file have a semicolon at the end.

@wwoytenko wwoytenko self-assigned this Jan 31, 2025
@wwoytenko
Copy link
Contributor

Hi @benregn! Thank you for reporting this.
I'll take some time to investigate and get back to you soon.

@wwoytenko
Copy link
Contributor

@benregn it is fixed in #256. I wil publish it soon.

@benregn
Copy link
Author

benregn commented Jan 31, 2025

Awesome! Thank you for the quick turn around 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants