Re: [Patch] ALTER SYSTEM READ ONLY

From: Prabhat Sahu <prabhat(dot)sahu(at)enterprisedb(dot)com>
To: Amul Sul <sulamul(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Patch] ALTER SYSTEM READ ONLY
Date: 2020-07-16 06:11:54
Message-ID: CANEvxPpMc+k4O=Gq9BiTA=3HpeHW=e-aihD7Qqo41cU7E0yCew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,
I was testing the feature on top of v3 patch and found the "pg_upgrade"
failure after keeping "alter system read only;" as below:

-- Steps:
./initdb -D data
./pg_ctl -D data -l logs start -c
./psql postgres
alter system read only;
\q
./pg_ctl -D data -l logs stop -c

./initdb -D data2
./pg_upgrade -b . -B . -d data -D data2 -p 5555 -P 5520

[edb(at)localhost bin]$ ./pg_upgrade -b . -B . -d data -D data2 -p 5555 -P 5520
Performing Consistency Checks
-----------------------------
Checking cluster versions ok

The source cluster was not shut down cleanly.
Failure, exiting

--Below is the logs
2021-07-16 11:04:20.305 IST [105788] LOG: starting PostgreSQL 14devel on
x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat
4.8.5-39), 64-bit
2020-07-16 11:04:20.309 IST [105788] LOG: listening on IPv6 address "::1",
port 5432
2020-07-16 11:04:20.309 IST [105788] LOG: listening on IPv4 address
"127.0.0.1", port 5432
2020-07-16 11:04:20.321 IST [105788] LOG: listening on Unix socket
"/tmp/.s.PGSQL.5432"
2020-07-16 11:04:20.347 IST [105789] LOG: database system was shut down at
2020-07-16 11:04:20 IST
2020-07-16 11:04:20.352 IST [105788] LOG: database system is ready to
accept connections
2020-07-16 11:04:20.534 IST [105790] LOG: system is now read only
2020-07-16 11:04:20.542 IST [105788] LOG: received fast shutdown request
2020-07-16 11:04:20.543 IST [105788] LOG: aborting any active transactions
2020-07-16 11:04:20.544 IST [105788] LOG: background worker "logical
replication launcher" (PID 105795) exited with exit code 1
2020-07-16 11:04:20.544 IST [105790] LOG: shutting down
2020-07-16 11:04:20.544 IST [105790] LOG: skipping shutdown checkpoint
because the system is read only
2020-07-16 11:04:20.551 IST [105788] LOG: database system is shut down

On Tue, Jul 14, 2020 at 12:08 PM Amul Sul <sulamul(at)gmail(dot)com> wrote:

> Attached is a rebased version for the latest master head[1].
>
> Regards,
> Amul
>
> 1] Commit # 101f903e51f52bf595cd8177d2e0bc6fe9000762
>

--

With Regards,
Prabhat Kumar Sahu
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesse Zhang 2020-07-16 06:16:47 Re: Volatile Functions in Parallel Plans
Previous Message Masahiko Sawada 2020-07-16 05:47:10 Re: Transactions involving multiple postgres foreign servers, take 2