Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

248
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda