Re: warning to publication created and wal_level is not set to logical

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Lucas Viecelli <lviecelli199@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, David Fetter <david@fetter.org>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-07-08T03:04:34Z
Lists: pgsql-hackers
On Wed, Mar 27, 2019 at 1:36 AM Lucas Viecelli <lviecelli199@gmail.com> wrote:
>> Oh, OK, then this seems like it's basically covered already.  I think
>> the original suggestion to add a WARNING during CREATE PUBLICATION
>> isn't unreasonable.  But we don't need to do more than that (and it
>> shouldn't be higher than WARNING).
>
> Okay, I think it will improve understanding of new users.
>
> Since everything is fine, thank you all for the comments

Hi Lucas,

The July Commitfest has started.  This patch is in "Needs review"
status, but it doesn't apply.  If I read the above discussion
correctly, it seems there is agreement that a warning here is a good
idea to commit this patch.  Could you please post a rebased patch?

A note on the message:

WARNING: `PUBLICATION` created but wal_level `is` not set to logical,
you need to change it before creating any SUBSCRIPTION

I wonder if it would be more typical project style to put the clue on
what to do into an "errhint" message, something like this:

WARNING: insufficient wal_level to publish logical changes
HINT:  Set wal_level to logical before creating subscriptions.

-- 
Thomas Munro
https://enterprisedb.com



Commits

  1. Warn if wal_level is too low when creating a publication.