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:
and a specific user with
REPLICATION
rights
It this something possible?
ThanksPostgreSQL | 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
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.
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
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
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
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 setupHey @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)
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 exposedIs this something planned on the roadmap at one point?
@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.
