| From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
|---|---|
| To: | 'Masahiko Sawada' <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | RE: POC: enable logical decoding when wal_level = 'replica' without a server restart |
| Date: | 2025-02-03 11:40:13 |
| Message-ID: | OSCPR01MB14966A23A7BF518C0BAF5B284F5F52@OSCPR01MB14966.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dear Sawada-san,
> I'm concerned that users could be confused if two different names
> refer to substantially the same thing.
>
> Having said that, I guess that we need to drastically change the
> messages. For example, I think that the wal_level worker should say
> something like "successfully made 'logical' wal_level effective"
> instead of saying something like "changed wal_level value". Also,
> users might not need gradual messages when increasing 'minimal' to
> 'logical' or decreasing 'logical' to 'minimal'.
+1 for something like "successfully made 'logical' wal_level effective", and
removing gradual messages.
> > 6.
> > With the patch present, the wal_level can be changed to the minimal even when
> the
> > streaming replication is going. If we do that, the walsender exits immediately
> and
> > the below FATAL appears periodically until the standby stops. Same things can
> be
> > said for the logical replication:
> >
> > ```
> > FATAL: streaming replication receiver "walreceiver" could not connect to the
> primary server:
> > connection to server on socket "/tmp/.s.PGSQL.oooo" failed:
> > FATAL: WAL senders require "wal_level" to be "replica" or "logical
> > ```
> >
> > I know this is not a perfect, but can we avoid the issue by reject the GUC update
> > if the walsender exists? Another approach is not to update the value when
> replication
> > slots need to be invalidated.
>
> Does it mean that we reject the config file from being reloaded in
> that case? I have no idea how to reject it in a case where the
> wal_level in postgresql.conf changed and the user did 'pg_ctl reload'.
I imagined like attached. When I modified wal_level to minimal and send SIGHUP,
postmaster reported below lines and failed to update wal_level.
```
LOG: received SIGHUP, reloading configuration files
LOG: wal_level cannot be set to "minimal" while walsender exists
LOG: configuration file "...postgresql.conf" contains errors; unaffected changes were applied
```
Best regards,
Hayato Kuroda
FUJITSU LIMITED
| Attachment | Content-Type | Size |
|---|---|---|
| add_check_hook.patch | application/octet-stream | 3.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavel Borisov | 2025-02-03 11:42:04 | Re: Using Expanded Objects other than Arrays from plpgsql |
| Previous Message | Nazir Bilal Yavuz | 2025-02-03 11:34:29 | Re: Show WAL write and fsync stats in pg_stat_io |