On Mon, Apr 18, 2022 at 3:29 PM Dilip Kumar <dilipbal...@gmail.com> wrote:

>
> This needs to be verified once by doing some manual testing as it may
> not be easily reproducible every time. If this happens to be true then
> I think your suggestion related to increasing autovacuum_naptime would
> work.
>
>
> I will try to reproduce this, maybe by reducing the autovacuum_naptime or 
> parallelly running some script that continuously performs DDL-only 
> transactions.

I have reproduced it [1] by repeatedly running the attached
script(stream.sql) from one session and parallely running the vacuum
analysis from the another session.

I have also changed the config for testing decoding to set the
autovacuum_naptime to 1d (patch attached)

[1]
Result without vacuum analyze:
                 data
------------------------------------------
 opening a streamed block for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 closing a streamed block for transaction
 committing streamed transaction
(13 rows)

Result with parallely running VACUUM ANALYZE

                   data
------------------------------------------
 opening a streamed block for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 streaming change for transaction
 closing a streamed block for transaction
 opening a streamed block for transaction
 streaming change for transaction
 closing a streamed block for transaction
 committing streamed transaction
(15 rows)


-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment: stream.sql
Description: application/sql

From ab4854cd98cc24213d7fcee3e9b6bcb2dcb93d92 Mon Sep 17 00:00:00 2001
From: Dilip Kumar <dilipkumar@localhost.localdomain>
Date: Tue, 19 Apr 2022 11:26:56 +0530
Subject: [PATCH] Increase autovacuum_naptime for test decoding testing

Occasionally the decoding of test cases fails due to the small autovacuum_naptime
on the slow machine.  Because the invalidation messages generated by the analyze
command make logical_decoding_workmem limit exhaust faster.
---
 contrib/test_decoding/logical.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/test_decoding/logical.conf b/contrib/test_decoding/logical.conf
index 07c4d3d..fc042c6 100644
--- a/contrib/test_decoding/logical.conf
+++ b/contrib/test_decoding/logical.conf
@@ -1,3 +1,4 @@
 wal_level = logical
 max_replication_slots = 4
+autovacuum_naptime = 1d
 logical_decoding_work_mem = 64kB
-- 
1.8.3.1

Reply via email to