wal2mongo
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
wal2mongo | 1.0.7 | ETL | Apache-2.0 | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9640 | wal2mongo | No | Yes | No | No | No | No | - |
| Related | wal2json decoderbufs test_decoding pgoutput decoder_raw pgmqtt kafka_fdw pgq pg_protobuf pgproto |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0.7 | 1817161514 | wal2mongo | - |
| RPM | PGDG | 1.0.7 | 1817161514 | wal2mongo_$v | - |
| DEB | PIGSTY | 1.0.7 | 1817161514 | postgresql-$v-wal2mongo | - |
Build
You can build the DEB packages for wal2mongo using pig build:
Install
You can install wal2mongo directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
This extension does not require
CREATE EXTENSION
Usage
wal2mongo: PostgreSQL logical decoding output plugin for MongoDB
A logical decoding output plugin that formats PostgreSQL WAL changes as MongoDB-compatible commands, enabling data replication from PostgreSQL to MongoDB.
Configuration
In postgresql.conf:
Using with SQL Functions
Using with pg_recvlogical
Replicating to MongoDB
The output can be applied directly in the MongoDB shell:
Or save to a .js file and import:
Output Format
- INSERT:
db.<table>.insertOne( { <columns> } ) - UPDATE:
db.<table>.updateOne( { <key> }, { $set: { <changes> } } ) - DELETE:
db.<table>.deleteOne( { <key> } )
Tables need a primary key or replica identity for UPDATE/DELETE operations to be captured.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)