Deduplicate code updating ControleFile's DBState.

From: Amul Sul <sulamul(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Deduplicate code updating ControleFile's DBState.
Date: 2021-09-14 06:05:01
Message-ID: CAAJ_b97nd_ghRpyFV9Djf9RLXkoTbOUqnocq11WGq9TisX09Fw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I would like to propose a patch that removes the duplicate code
setting database state in the control file.

The patch is straightforward but the only concern is that in
StartupXLOG(), SharedRecoveryState now gets updated only with spin
lock; earlier it also had ControlFileLock in addition to that. AFAICU,
I don't see any problem there, since until the startup process exists
other backends could not connect and write a WAL record.

Regards,
Amul Sul.
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
v1-0001-Deduplicate-code-updating-ControleFile-s-DBState-.patch application/x-patch 4.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-09-14 06:06:41 Re: Add jsonlog log_destination for JSON server logs
Previous Message Greg Nancarrow 2021-09-14 05:39:20 Re: Logical replication keepalive flood