Re: warning to publication created and wal_level is not set tological - Mailing list pgsql-hackers

From David Fetter
Subject Re: warning to publication created and wal_level is not set tological
Date
Msg-id 20190324175448.GA12561@fetter.org
Whole thread Raw
In response to warning to publication created and wal_level is not set to logical  (Lucas Viecelli <lviecelli199@gmail.com>)
Responses Re: warning to publication created and wal_level is not set to logical
List pgsql-hackers
On Thu, Mar 21, 2019 at 07:45:59PM -0300, Lucas Viecelli wrote:
> Hi everyone,
> 
> A very common question among new users is how wal_level works and it
> levels. I heard about some situations like that, a user create a new
> publication in its master database and he/she simply does not change
> wal_level to logical, sometimes, this person lost maintenance
> window, or a chance to restart postgres service, usually a
> production database, and it will discover that wal_level is not
> right just in subscription creation.  Attempting to iterate between
> new (and even experienced) users with logical replication, I am
> sending a patch that when an PUBLICATION is created and the
> wal_level is different from logical prints a WARNING in console/log:

Is a WARNING sufficient?  Maybe I'm misunderstanding something
important, but I think the attempt should fail with a HINT to set the
wal_level ahead of time.

Possibly in a separate patch, setting the wal_level to anything lower
than logical when publications exist should also fail.

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Tattsu Yama
Date:
Subject: Re: [HACKERS] CLUSTER command progress monitor
Next
From: Fabien COELHO
Date:
Subject: Re: CPU costs of random_zipfian in pgbench