mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Logical replication support for TRUNCATE
Update the built-in logical replication system to make use of the previously added logical decoding for TRUNCATE support. Add the required truncate callback to pgoutput and a new logical replication protocol message. Publications get a new attribute to determine whether to replicate truncate actions. When updating a publication via pg_dump from an older version, this is not set, thus preserving the previous behavior. Author: Simon Riggs <simon@2ndquadrant.com> Author: Marco Nenciarini <marco.nenciarini@2ndquadrant.it> Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com> Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
This commit is contained in:
@@ -97,6 +97,10 @@ extern void logicalrep_write_delete(StringInfo out, Relation rel,
|
||||
HeapTuple oldtuple);
|
||||
extern LogicalRepRelId logicalrep_read_delete(StringInfo in,
|
||||
LogicalRepTupleData *oldtup);
|
||||
extern void logicalrep_write_truncate(StringInfo out, int nrelids, Oid relids[],
|
||||
bool cascade, bool restart_seqs);
|
||||
extern List *logicalrep_read_truncate(StringInfo in,
|
||||
bool *cascade, bool *restart_seqs);
|
||||
extern void logicalrep_write_rel(StringInfo out, Relation rel);
|
||||
extern LogicalRepRelation *logicalrep_read_rel(StringInfo in);
|
||||
extern void logicalrep_write_typ(StringInfo out, Oid typoid);
|
||||
|
Reference in New Issue
Block a user