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

Fetch tables metadata takes too long #145

Closed
martingehrke opened this issue Feb 2, 2022 · 22 comments · Fixed by #170
Closed

Fetch tables metadata takes too long #145

martingehrke opened this issue Feb 2, 2022 · 22 comments · Fixed by #170

Comments

@martingehrke
Copy link

Fetch tables metadata...
takes more time than a full database dump.

I have filters in place for only 4 tables I need out of 100+ but this still takes longer than I expect.

@martingehrke
Copy link
Author

I see SELECT pg_catalog.pg_get_serial_sequence ( ? ) millions of times on the db

@angryjohnnie
Copy link

Fetch tables metadata... takes more time than a full database dump.

I came here today to say exactly this. I have 20-something schemas. Each with about 50 tables. The metadata fetch takes over an hour. the actual db dumping part takes probably 10 min to a local disk.

TY for the tool, it does the thing, I just wish it were quicker.

@evgeniy-r
Copy link
Member

evgeniy-r commented Feb 3, 2022

Hello! I think that it is a some kind of bug, we will check this.

@martingehrke
Copy link
Author

martingehrke commented Feb 3, 2022 via email

@evgeniy-r
Copy link
Member

I have some ideas, could you please provide the database schema (the dump without data)?

@martingehrke
Copy link
Author

martingehrke commented Feb 4, 2022 via email

@angryjohnnie
Copy link

angryjohnnie https://github.com/angryjohnnie, are you able to easily? this is a production database, I can't just share our schema, sorry.

im not sure what our policy is regarding sharing that schema. I can see if I can find out though.

@angryjohnnie
Copy link

It looks like I am not allowed to share our schema either, unfortunately.

@evgeniy-r
Copy link
Member

OK, then we will try to fix this without these schemas.

@martingehrke
Copy link
Author

martingehrke commented Feb 7, 2022 via email

@marmik18
Copy link
Contributor

I have a similar kind of issue, I have 4 schemas and around 20 tables in each of the schema. I also tried passing filter args using the cli <PG_DUMP_ARGS>. But it still takes more than 20 mins to fetch the metadata.

@evgeniy-r
Copy link
Member

Can anybody run dumping with the tracing branch and copy the output here? I can build a binary if required.

@martingehrke
Copy link
Author

martingehrke commented Feb 15, 2022 via email

@evgeniy-r
Copy link
Member

Platform? (win/linux/mac - Darwin or ARM)

@martingehrke
Copy link
Author

martingehrke commented Feb 15, 2022 via email

@evgeniy-r
Copy link
Member

pg_datanymizer.zip

@martingehrke
Copy link
Author

martingehrke commented Feb 15, 2022 via email

@evgeniy-r
Copy link
Member

Thank you very much, I will look into it...

@evgeniy-r
Copy link
Member

Try the updated version, please.
pg_datanymizer.zip

@martingehrke
Copy link
Author

martingehrke commented Feb 16, 2022 via email

@evgeniy-r
Copy link
Member

@martingehrke, can you check this one too please?
pg_datanymizer.zip

@martingehrke
Copy link
Author

martingehrke commented Feb 25, 2022 via email

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 a pull request may close this issue.

4 participants