Subject: After DB upgrade from PG13 to PG15 showing error

From: Ram Pratap Maurya <[email-masked]>
Date: Tue, 27 Aug 2024 08:50:36 +0000

Dear Team,

We have upgraded PostgreSQL DB from version 13 to 15 version .
We are facing issue in PG15 we not enable any parameter related to AUTOVACUUM , but still running on PG15 data base.

Below process showing :

2313192 | 02:10:01.283176         |            | myLava  | active | autovacuum: VACUUM ANALYZE public.tstock_movement (to prevent wraparound)

And one more issue we are facing after upgrade lot of alert is coming in DB log file , please suggest this is bug in Postgresql-15 version.

2024-08-26 00:00:36.783 IST [702937] WARNING:  oldest xmin is far in the past
2024-08-26 00:00:36.783 IST [702937] HINT:  Close open transactions soon to avoid wraparound problems.
        You might also need to commit or roll back old prepared transactions, or drop stale replication slots.
2024-08-26 00:00:36.784 IST [702937] WARNING:  oldest xmin is far in the past
2024-08-26 00:00:36.784 IST [702937] HINT:  Close open transactions soon to avoid wraparound problems.
        You might also need to commit or roll back old prepared transactions, or drop stale replication slots.

DB  OS -RHEL8.

Regards,
Ram Pratap.

---

From: Kashif Zeeshan <[email-masked]>
Date: Tue, 27 Aug 2024 13:52:34 +0500

Hi

On Tue, Aug 27, 2024 at 1:50 PM Ram Pratap Maurya <
[email-masked]> wrote:

> We are facing issue in PG15 we not enable any parameter related to
> AUTOVACUUM , but still running on PG15 data base.
>
>
>
> Below process showing :
>
>
>
> *2313192 | 02:10:01.283176         |            | myLava  | active |
> autovacuum: VACUUM ANALYZE public.tstock_movement (to prevent wraparound)*
>
>
>
> And one more issue we are facing after upgrade lot of alert is coming in
> DB log file , please suggest this is bug in Postgresql-15 version.
>
>
>
> *2024-08-26 00:00:36.783 IST [702937] WARNING:  oldest xmin is far in the
> past*
>
> *2024-08-26 00:00:36.783 IST [702937] HINT:  Close open transactions soon
> to avoid wraparound problems.*
>
> *        You might also need to commit or roll back old prepared
> transactions, or drop stale replication slots.*
>
> *2024-08-26 00:00:36.784 IST [702937] WARNING:  oldest xmin is far in the
> past*
>
> *2024-08-26 00:00:36.784 IST [702937] HINT:  Close open transactions soon
> to avoid wraparound problems.*
>
> *        You might also need to commit or roll back old prepared
> transactions, or drop stale replication slots.*
>

These are warnings not error, can you please share the error you are
getting.

Thanks
Kashif Zeeshan

> *DB  OS -RHEL8.*

---

From: Adrian Klaver <[email-masked]>
Date: Tue, 27 Aug 2024 09:13:43 -0700

> AUTOVACUUM , but still running on PG15 data base.

You need to provide more detail about the above.

What parameters are you trying to change?

Do you get an error?

Did you reload/restart the server after the changes?

What user did you do the changes as?

> *2024-08-26 00:00:36.783 IST [702937] WARNING:  oldest xmin is far in 
> the past*
> 
> *2024-08-26 00:00:36.783 IST [702937] HINT:  Close open transactions 
> soon to avoid wraparound problems.*
> 

I would say the above is pointing you at possible solutions.

To understand why this is important:

https://www.postgresql.org/docs/16/routine-vacuuming.html

Read the following sections:

25.1.5. Preventing Transaction ID Wraparound Failures

25.1.6. The Autovacuum Daemon

-- 
Adrian Klaver
[email-masked]