diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-04-14 14:35:05 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-04-14 14:37:06 -0400 |
commit | 139eb9673cb84c76f493af7e68301ae204199746 (patch) | |
tree | 6ab3d94e12bb2ab040ecd2b64cc6759efb582f9c /src/backend/replication/logical/tablesync.c | |
parent | 67c2def11d49de05aacd959ecdffc6736f52efee (diff) | |
download | postgresql-139eb9673cb84c76f493af7e68301ae204199746.tar.gz |
Report statistics in logical replication workers
Author: Stas Kelvich <s.kelvich@postgrespro.ru>
Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Reported-by: Fujii Masao <masao.fujii@gmail.com>
Diffstat (limited to 'src/backend/replication/logical/tablesync.c')
-rw-r--r-- | src/backend/replication/logical/tablesync.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c index bf27641009..d287e95df1 100644 --- a/src/backend/replication/logical/tablesync.c +++ b/src/backend/replication/logical/tablesync.c @@ -114,9 +114,15 @@ StringInfo copybuf = NULL; static void pg_attribute_noreturn() finish_sync_worker(void) { - /* Commit any outstanding transaction. */ + /* + * Commit any outstanding transaction. This is the usual case, unless + * there was nothing to do for the table. + */ if (IsTransactionState()) + { CommitTransactionCommand(); + pgstat_report_stat(false); + } /* And flush all writes. */ XLogFlush(GetXLogWriteRecPtr()); |