Re: do only critical work during single-user vacuum? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: do only critical work during single-user vacuum?
Date
Msg-id CA+TgmoZXeGL6Fx9Jww9CeDRBYQmXFQ1LNZ_1Jn=b3E+vZt2nPw@mail.gmail.com
Whole thread Raw
In response to Re: do only critical work during single-user vacuum?  (John Naylor <john.naylor@enterprisedb.com>)
Responses Re: do only critical work during single-user vacuum?
List pgsql-hackers
On Thu, Feb 3, 2022 at 5:08 PM John Naylor <john.naylor@enterprisedb.com> wrote:
> Looking closer, there is a function defined by an extension. I'd have
> to dig further to see if writes happen. The error is exactly what
> we've been talking about:
>
> 2022-01-03 22:03:23 PST ERROR: database is not accepting commands to
> avoid wraparound data loss in database "<redacted>"
> 2022-01-03 22:03:23 PST HINT: Stop the postmaster and vacuum that
> database in single-user mode. You might also need to commit or roll
> back old prepared transactions.

That error comes from GetNewTransactionId(), so that function must
either try to execute DML or do something else which causes an XID to
be assigned. I think a plain SELECT should work just fine.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: row filtering for logical replication
Next
From: Robert Haas
Date:
Subject: Re: Fix BUG #17335: Duplicate result rows in Gather node