Prisma postgres and replicas

Hi, I'm starting to use Prisma postgres on a new project. For that project, we will need to be able to plug data from the database to the datalake. We are thinking about Estuary to handle that. But there are some postgres requirement:
wal_level set to logical
wal_level set to logical
and a specific user with REPLICATION rights It this something possible? Thanks
PostgreSQL | Estuary Flow Documentation
This connector uses change data capture (CDC) to continuously capture updates in a PostgreSQL database into one or more Flow collections.
6 Replies
Prisma AI Help
Greetings, curious mind! I'm the Prisma AI Help Bot. Want to chat with a human team member (ETA: TBD)? Or skip the wait and get my best guess right now? The speed of automation awaits you.
Dan😏
Dan😏4w ago
yeah, you can definitely configure postgresql to support logical replication with prisma first, you need to update your postgresql.conf file to wal_level to logical
wal_level = logical
wal_level = logical
also, you'll wanna check that max_replicatio_slots and max_wal_senders are set high enough to support your needs then, maybe you need to create a replication user in postgresql, create a user with the required replication priviledges
CREATE USER your_replication_user WITH REPLICATION PASSWORD 'your_secure_password';
CREATE USER your_replication_user WITH REPLICATION PASSWORD 'your_secure_password';
plz make sure this user has the necessary access to the database and next is to grant the right permissions if your prisam schema is set up to use a specific schema like public, grant the replication user access
GRANT CONNECT ON DATABASE your_database TO your_replication_user;
GRANT USAGE ON SCHEMA public TO your_replication_user;
GRANT CONNECT ON DATABASE your_database TO your_replication_user;
GRANT USAGE ON SCHEMA public TO your_replication_user;
in my exp, prisma itself doesnt directly handle replication, but since it works with postgresql, it wont interfere with the logical setup just make sure that any reads from replicas are handled separately like through a load balancer or a read-replica-aware setup
Christophe
ChristopheOP4w ago
Hey @Dan😏 Thx for the response 🙂 I'm not sure I'm explaining correctly. I'm using prisma with a prisma managed database on console.prisma.io I've no access to any prisma conf (unless there is something I'm missing)
Dan😏
Dan😏4w ago
if you're using a prisma-managed database on console.prisma.io, you won't have direct access to modify postgresql settings like wal_level or create a replication user manually you know, prisma cloud manages the database for you, so low-level configuration changes aren’t exposed
Christophe
ChristopheOP4w ago
Is this something planned on the roadmap at one point?
Nurul
Nurul4w ago
@Christophe Thanks for your question! @Dan😏 Thank you for chiming in 🙂 Currently, Prisma Postgres does not allow creating database users. So, currently it won't be possible to create a user with REPLICATION rights. We do plan to allow creating database users soon. Regarding your use case of pulling in data from the database: You can try out Prisma Pulse by enabling it from your environment settings. You should be able to stream events in real time and capture them as they happen.
No description

Did you find this page helpful?