pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: stashukny@gmail.com
Subject: BUG #17914: walsenders taking up all memory
Date: Mon, 01 May 2023 20:25:00 +0000
Message-ID: <17914-f2ef37f9068914c6@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17914
Logged by:          Stan S
Email address:      stashukny@gmail.com
PostgreSQL version: 14.3
Operating system:   AWS RDS - (Red Hat 7.3.1-12), 64-bit
Description:        

Seeing the same issue as reported here:
https://www.postgresql.org/message-id/CAMnUB3oYugXCBLSkih%2BqNsWQPciEwos6g_AMbnz_peNoxfHwyw%40mail.g...

In our case, logical_decoding_work_mem is set to 64 MB, yet walsenders can
each take up 30 GB of memory, crashing our database. 

Able to reproduce it locally in docker, using Postgres 14.7 (latest minor
version of 14) following the same instructions as mentioned in
https://www.postgresql.org/message-id/CAMnUB3oYugXCBLSkih%2BqNsWQPciEwos6g_AMbnz_peNoxfHwyw%40mail.g...
which is basically running parallelized update statements on one table on
the publisher, updating it's json column like this:

    UPDATE tab1 SET data = data || '{"test_0": "1", "test_1": "1", "test_2":
"1",
"test_3": "1", "test_4": "1", "test_5": "1", "test_6": "1", "test_7": "1",
"test_8":
"1", "test_9": "1", "test_a": "1", "test_b": "1", "test_c": "1", "test_d":
"1",
"test_e": "1", "test_f": "1"}' #- '{test_0}'

The end result is each walsender's memory usage jumping up many times the
logical_decoding_work_mem limit.



view thread (5+ messages)  latest in thread

Message-ID: <17914-f2ef37f9068914c6@postgresql.org>
Permalink:  ../17914-f2ef37f9068914c6@postgresql.org/
Also on:    postgresql.org/message-id/17914-f2ef37f9068914c6@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, stashukny@gmail.com
  Subject: Re: BUG #17914: walsenders taking up all memory
  In-Reply-To: <17914-f2ef37f9068914c6@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox