From: Dolan, Sean <sean.dolan@lmco.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Many logical replication synchronization worker threads kicking off for ONE table
Date: Thu, 16 Mar 2023 20:38:07 +0000
Message-ID: <cd6c557caa5c42af95ec1f9cf914cc8a@lmco.com> (raw)
In-Reply-To: <47d0b525ad3ba570b4100e7b8d2a2b002ceba232.camel@cybertec.at>
References: <0eda9b7d13e34cc786d30c602510f3e4@lmco.com>
<c78803e2308015fcbedd36b4056f4cfeeb5f6816.camel@cybertec.at>
<6eec8fc3dfa743ff9b19d8ce0e87763d@lmco.com>
<47d0b525ad3ba570b4100e7b8d2a2b002ceba232.camel@cybertec.at>
The initial email below was the end result of something "run-away" in my logical replication.
PostGres 13.6, RedHat 7.9
Database A is the publisher; Database B is the subscriber. Within Database A are multiple schemas and the publication ensures that all the schemas and its tables are added. There is one table in particular that has 1.4million rows of data.
I create a subscription on Database B and can see in the log:
LOG: logical replication table synchronization for subscription "sub_to_dbaseA", table "alert_history" has started.
CONTEXT: COPY alert_history line 6668456
LOG: logical replication table synchronization for subscription "sub_to_dbaseA", table "alert_history" has started.
CONTEXT: COPY alert_history line 5174606
LOG: logical replication table synchronization for subscription "sub_to_dbaseA", table "alert_history" has started.
CONTEXT: COPY alert_history line 4325283
Normally I would see a line for "finished", but I never do.
I then actively watch the schema/table and do \dt+ and can see that table grow in 2GB increments until I fill up the entire drive and run out of room for that schema.
I am NOT getting any "checkpoints are occurring too frequently" As I have updated my WAL size:
max_wal_size=4GB
min_wal_size=1GB
Is the system having trouble synching this amount of data in a quick fashion and therefore kicks off more synchronization threads? Anything I can do to prevent this?
Thank you
-----Original Message-----
From: Laurenz Albe <laurenz.albe@cybertec.at>
Sent: Thursday, March 16, 2023 1:25 PM
To: Dolan, Sean (US N-ISYS Technologies Inc.) <sean.dolan@lmco.com>; pgsql-general@lists.postgresql.org
Subject: EXTERNAL: Re: EXTERNAL: Re: "No Free extents", table using all allocated space but no rows!
On Thu, 2023-03-16 at 13:20 +0000, Dolan, Sean wrote:
> I messed up and confused issues. The error is :
> ERROR: Could not extend pg_tblspc/16555/PG_13_20200/xxxx/xxxx No space left on device
> HINT: Check free disk space
>
> So the schema is "full" and the offender is this one table.
> I can't TRUNCATE as there needs to be space to perform the action.
> Is there a way to see if there is a transaction on that table like you allude to?
Ah, that's different.
If you don't have enough space to run TRUNCATE, and you don't feel like
extending the disk space, DROP TABLE would be a convenient alternative.
Yours,
Laurenz Albe
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: sean.dolan@lmco.com, laurenz.albe@cybertec.at
Subject: Re: Many logical replication synchronization worker threads kicking off for ONE table
In-Reply-To: <cd6c557caa5c42af95ec1f9cf914cc8a@lmco.com>
References: <0eda9b7d13e34cc786d30c602510f3e4@lmco.com> <c78803e2308015fcbedd36b4056f4cfeeb5f6816.camel@cybertec.at> <6eec8fc3dfa743ff9b19d8ce0e87763d@lmco.com> <47d0b525ad3ba570b4100e7b8d2a2b002ceba232.camel@cybertec.at> <cd6c557caa5c42af95ec1f9cf914cc8a@lmco.com>
* 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