From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | David Fetter <david(at)fetter(dot)org>, Lucas Viecelli <lviecelli199(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: warning to publication created and wal_level is not set to logical |
Date: | 2019-03-25 17:53:32 |
Message-ID: | 20963.1553536412@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Mar 25, 2019 at 10:15 AM David Fetter <david(at)fetter(dot)org> wrote:
>>> I do not believe this is practical either. GUC manipulation cannot
>>> look at the catalogs.
>> In this case, it really has to do something. Is setting GUCs a path so
>> critical it can't take one branch?
> No, but that has about zero to do with the actual problem that Tom is
> describing.
To clarify, the problems with that are
(1) Initial GUC settings are absorbed by the postmaster, which cannot
examine catalogs *at all*. It is neither connected to any database
nor allowed to participate in transactions. These are not things that
will change.
(2) wal_level is a global setting, but the catalogs we'd have to look
at to discover the existence of a publication are per-database. Thus
for example there is no reliable way for "ALTER SYSTEM SET wal_level"
to detect whether publications exist in other databases of the cluster.
(To say nothing of race conditions against concurrent publication
creation commands.)
Adding the dump/restore issue on top of that, it seems clear to me that
we can't usefully prevent a conflicting setting of wal_level from being
established. The best we can do is whine about it later.
One idea that might be useful is to have walsenders refuse to transmit
any logical-replication data if they see wal_level is too low. That
would get users' attention pretty quickly.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2019-03-25 18:04:05 | Re: Assert failure when validating foreign keys |
Previous Message | Robert Haas | 2019-03-25 17:39:27 | Re: warning to publication created and wal_level is not set to logical |