Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

250
Views
How to get a partial dump of a postgresql database for non-production environments?

I've got 40+ tables, millions of rows per table, hundreds of foreign key relationships and constraints.

I would like to get the entire exact table structure copied over but with say maybe a few hundred or a few thousand rows for creating light development environments.

Thus far, I've only seen pg_dump which, while it can export a single table's partial rows, has no way of exporting a partial database with a few rows per table while maintaining referential integrity, that is, if a table depends on some foreign key, make sure there are certain values of that foreign key in the referenced table too so the relationship is intact.

Given the massive number of tables (which change quite frequently), it would be challenging to create and maintain manual INSERT commands for so many tables.

Is there any solution for this? (for postgresql specifically)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Did you try Jailer? I have had good experiences with it.

Features:

  • Exports consistent and referentially intact row-sets from your productive database and imports the data into your development and test environment.
  • Data Browsing. Navigate bidirectionally through the database by following foreign-key-based or user-defined relationships.
  • SQL Console with code completion, syntax highlighting and database metadata visualization.
  • A demo database is included with which you can get a first impression without any configuration effort.
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!