| From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
|---|---|
| To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
| Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: BUG: *FF WALs under 9.2 (WAS: .ready files appearing on slaves) |
| Date: | 2014-10-08 23:23:53 |
| Message-ID: | CAB7nPqQFVdooVWfW0-0qhw-TqbeDg88w1x5kqsvjUArJGz-bHg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Oct 8, 2014 at 11:38 PM, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com
> wrote:
> On 10/08/2014 04:59 PM, Fujii Masao wrote:
>
>> On Wed, Oct 8, 2014 at 6:54 PM, Heikki Linnakangas
>> <hlinnakangas(at)vmware(dot)com> wrote:
>>
>>> Instead of creating any .done files during recovery, we could scan
>>> pg_xlog
>>> at promotion, and create a .done file for every WAL segment that's
>>> present
>>> at that point. That would be more robust. And then apply your patch, to
>>> recycle old segments during archive recovery, ignoring .done files.
>>>
>>
>> What happens if a user shutdowns the standby, removes recovery.conf and
>> starts the server as the master?
>>
>
> Um, that's not a safe thing to do anyway, is it?
>
That's not safe as it bypasses all the consistency checks of promotion.
Now, it is also something that repmgr for example does as far as I recall
to do a node "promotion". What if we simply document the problem properly
then? The apparition of those phantom WAL files is more scary than a user
or a utility that does a promotion with a server restart. Not to mention as
well that users as free to add themselves files to pg_xlog.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2014-10-08 23:29:01 | Re: Add CREATE support to event triggers |
| Previous Message | Peter Geoghegan | 2014-10-08 22:51:55 | Re: UPSERT wiki page, and SQL MERGE syntax |