Content Deep Dive
Partial data dumps using Postgres Row Level Security
Blog post from Supabase
Post Details
Company
Date Published
Author
Paul Copplestone
Word Count
533
Language
English
Hacker News Points
2
Summary
In order to create seed data for testing without compromising sensitive information, one can use PostgreSQL's Row Level Security (RLS). This involves creating a restricted access user and defining RLS rules for that user. The exporter user is then used to dump the desired data using pg_dump with the --enable-row-security flag. Various data access patterns such as email rules, recent data, and flags can be applied depending on the requirements. Alternative strategies like Snaplet and Database Lab Engine are also available for running development environments.