frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

What interesting things low spending people do, that others know nothing about?

9•evolve2k•1h ago•8 comments

Big Beautiful Bill R&D Tax: Will tech go on a hiring spree again?

6•jbverschoor•5h ago•7 comments

I'm Peter Roberts, immigration attorney, who does work for YC and startups. AMA

251•proberts•3d ago•447 comments

Ask HN: What's your go-to message queue in 2025?

56•enether•4d ago•92 comments

Ask HN: Do people actually pay for small web tools?

16•scratchyone•1d ago•15 comments

Ask HN: Best on device LLM tooling for PDFs?

4•martinald•17h ago•1 comments

Ask HN: Moving to London from California

7•siamese_puff•12h ago•9 comments

Ask HN: How are you acquiring your first hundred users?

566•amanchanda•6d ago•350 comments

Ask HN: Conversational AI to Learn a Language

13•edweis•2d ago•5 comments

Ask HN: Anyone working in traditional ML/stats research instead of LLMs?

20•itsmekali321•2d ago•10 comments

Is current state of querying on observability data broken?

12•pranay01•1d ago•0 comments

Ask HN: Email Provider for Main Account?

23•agent008t•4d ago•25 comments

Xray: A full-behavior-chain anti-malware system built in Go by a student

6•tangtian•2d ago•0 comments

Ask HN: How do you store private keys?

7•max_•2d ago•15 comments

Best AI editor for local models?

6•rocketbro•2d ago•0 comments

Ask HN: How do you store the knowledge gained in a day?

67•dennisy•5d ago•95 comments

SwipeJobs App – Tinder for Job Seekers

3•fidla•1d ago•10 comments

Ask HN: Our only salesperson was working for a competitor. Advice?

12•betrayawayed555•2d ago•8 comments

Ask HN: Why is no one making FILE_ID.DIZ anymore?

11•reconnecting•4d ago•5 comments

Ask HN: Is Slack Down?

69•abatilo•6d ago•29 comments

Symbolic Logic Based LLM

5•sandeeptshelvan•3d ago•1 comments

FlyLoop – AI Agent for Scheduling Meetings and Managing Your Calendar

19•localbuilder•6d ago•4 comments

Ask HN: Did anyone else see an avalanche of old email appear in Gmail?

4•DamnInteresting•2d ago•2 comments

Ask HN: How would you fund a tech cooperative owned by workers and users?

8•prrada•3d ago•7 comments

What do people use for on-call these days?

8•skullum•2d ago•10 comments

Ask HN: Any good tools to pgdump multi tenant database?

3•polishdude20•2d ago•4 comments
Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

3•polishdude20•2d ago
Just joined a new company and they run a multi tenant database in postgres where each tenant is distinguished by their account ID. I'd like to be able to dump the data of a single account to my local instance to assist in debugging.

Problem is, many of the entities do not include an account ID. For example, a user can have an account ID but a user post will not but it will be tied to a user ID.

Also foreign keys aren't really implemented fully.

Are there any tools or techniques that could help make this process easier to do?

Comments

tudorg•2d ago
You can try with data subsetting tools, a few that I know are: greenmask, jailer, tonic condenser, and I think there are more. They are not exactly for your use case, but might help you a bit. The problem is most of these tools can walk foreign keys, but only in one directions.

Also, since you said FK are not fully implemented, then there just won't be enough information for them to work with. So you can either work on fixing the foreign keys or have more complex scripts.

polishdude20•2d ago
Thanks for the suggestions!

Yeah due to the unavailability of FK's, I'd have to somehow map certain ID columns to the tables they're for, accounting for slight naming convention differences.

abhisek•2d ago
This is poor design. Multi-tenant data model design must have a tenant or segment ID for every tenant segmented tables. While it may not be a problem initially but as the business grows, you may need to move tenant data to separate DBs or even different regions based on compliance requirements. IMHO it is a good idea to run DB migrations and have a tenant ID populated in all tenant segmented tables
polishdude20•2d ago
Oh yes I agree with you. It may become a big push to convince my org to do that