Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Setiap database PostgreSQL sumber mengandalkan fitur decoding logis-nya. Di PostgreSQL, decoding logis diimplementasikan dengan mendekode konten file Write Ahead Log (WAL). File WAL berisi informasi tentang histori aktivitas pada database, dan Datastream memanfaatkan file ini untuk membuat kueri perubahan data. Untuk mengetahui informasi selengkapnya tentang cara kerja Datastream dengan file WAL, lihat Menggunakan file WAL database PostgreSQL.
Slot publikasi dan replikasi
Saat mengonfigurasi sumber PostgreSQL, Anda perlu membuat publikasi dan slot replikasi.
Publikasi adalah serangkaian perubahan yang dihasilkan dari tabel, atau sekelompok tabel,
yang ingin Anda replikasi menggunakan replikasi logis.
Slot replikasi adalah fitur PostgreSQL yang memastikan bahwa aliran perubahan yang disimpan dalam file log WAL direplikasi ke tujuan dalam urutan yang benar.
Setiap slot replikasi mengalirkan urutan perubahan dari satu database, dan setiap publikasi hanya ada dalam satu database. Artinya, Anda perlu membuat satu atau beberapa aliran per database, dengan satu slot replikasi per aliran. Sebaiknya nama publikasi disesuaikan dengan tabel yang dipilih dalam aliran agar lebih jelas.
Untuk mengetahui informasi selengkapnya, lihat Publikasi
dan Slot replikasi
dalam dokumentasi PostgreSQL.
Database yang didukung
Datastream berfungsi dengan jenis database PostgreSQL berikut:
AlloyDB untuk PostgreSQL
AlloyDB Omni
Amazon Aurora PostgreSQL
Amazon RDS for PostgreSQL
Cloud SQL untuk PostgreSQL
PostgreSQL yang dikelola sendiri (di lokasi atau dihosting di cloud)
Langkah berikutnya
Pelajari cara mengonfigurasi database AlloyDB untuk PostgreSQL agar dapat digunakan dengan Datastream.
Pelajari cara mengonfigurasi AlloyDB Omni agar dapat digunakan dengan Datastream.
Pelajari cara mengonfigurasi database Amazon Aurora PostgreSQL agar dapat digunakan dengan Datastream.
Pelajari cara mengonfigurasi database Amazon RDS for PostgreSQL agar dapat digunakan dengan Datastream.
Pelajari cara mengonfigurasi database Cloud SQL untuk PostgreSQL agar dapat digunakan dengan Datastream.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-12 UTC."],[[["\u003cp\u003eDatastream leverages PostgreSQL's logical decoding feature, which decodes the Write Ahead Log (WAL) files to query data changes.\u003c/p\u003e\n"],["\u003cp\u003eConfiguring a PostgreSQL source for Datastream requires creating a publication, which is a set of changes from tables to be replicated.\u003c/p\u003e\n"],["\u003cp\u003eA replication slot, a PostgreSQL feature, is also needed to ensure that the stream of changes from a WAL log file is replicated to the destination in the correct order.\u003c/p\u003e\n"],["\u003cp\u003eDatastream supports various PostgreSQL databases, including AlloyDB for PostgreSQL, Amazon Aurora PostgreSQL, Cloud SQL for PostgreSQL, and self-managed PostgreSQL.\u003c/p\u003e\n"],["\u003cp\u003eEach replication slot streams a sequence of changes from a single database, and each publication exists in only one database.\u003c/p\u003e\n"]]],[],null,["# Configure a source PostgreSQL database\n\nEach source PostgreSQL database relies upon its [logical decoding](https://www.postgresql.org/docs/current/logicaldecoding-explanation.html) feature. In PostgreSQL, logical decoding is implemented by decoding the contents of the Write Ahead Log (WAL) files. The WAL files contain information about the history of activity on a database, and Datastream leverages these files to query data changes. For more information about how Datastream works with WAL files, see [Work with PostgreSQL database WAL files](/datastream/docs/work-with-postgresql-database-wal-log-files).\n\nPublication and replication slots\n---------------------------------\n\nWhen you configure your PostgreSQL source, you need to create a publication and a\nreplication slot.\n\nA publication is a set of changes generated from a table, or a group of tables,\nthat you want to replicate using logical replication.\n\nA replication slot is a PostgreSQL feature which ensures that a stream of changes\nstored in a WAL log file is replicated to the destination in the correct order.\n\nEach replication slot streams a sequence of changes from a single database, and each publication exists in only one database. This means that you need to create one or more streams per database, with one replication slot per stream. It's also a good practice to keep the publication name aligned with the tables selected in the stream for clarity.\n\nFor more information, see [Publication](https://www.postgresql.org/docs/current/logical-replication-publication.html#LOGICAL-REPLICATION-PUBLICATION)\nand [Replication slots](https://www.postgresql.org/docs/current/logicaldecoding-explanation.html#LOGICALDECODING-REPLICATION-SLOTS)\nin PostgreSQL documentation.\n\nSupported databases\n-------------------\n\nDatastream works with the following types of PostgreSQL databases:\n\n- AlloyDB for PostgreSQL\n- AlloyDB Omni\n- Amazon Aurora PostgreSQL\n- Amazon RDS for PostgreSQL\n- Cloud SQL for PostgreSQL\n- Self-managed PostgreSQL (on-premise or cloud-hosted)\n\nWhat's next\n-----------\n\n- Learn how to configure an [AlloyDB for PostgreSQL](/datastream/docs/configure-alloydb-psql) database to work with Datastream.\n- Learn how to configure [AlloyDB Omni](/datastream/docs/configure-self-managed-psql) to work with Datastream.\n- Learn how to configure an [Amazon Aurora PostgreSQL](/datastream/docs/configure-amazon-aurora-psql) database to work with Datastream.\n- Learn how to configure an [Amazon RDS for PostgreSQL](/datastream/docs/configure-amazon-rds-psql) database to work with Datastream.\n- Learn how to configure a [Cloud SQL for PostgreSQL](/datastream/docs/configure-cloudsql-psql) database to work with Datastream.\n- Learn how to configure a [self-managed PostgreSQL](/datastream/docs/configure-self-managed-psql) database to work with Datastream."]]