Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKdFj-0003FO-3m for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Oct 2019 06:57:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKdFh-0000Pp-Sk for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Oct 2019 06:57:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKdFh-0000PG-Ii for pgsql-bugs@lists.postgresql.org; Wed, 16 Oct 2019 06:57:45 +0000 Received: from sender4-of-o54.zoho.com ([136.143.188.54]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKdFf-0005dR-26 for pgsql-bugs@lists.postgresql.org; Wed, 16 Oct 2019 06:57:45 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1571209056; cv=none; d=zoho.com; s=zohoarc; b=CUqB5b1AELA56M1PajtH2iyp8y7gdmPSz7h/aNo0ODFnExwJAAaOanYbXkG4lEyuI5SwoaJfiZZxILsV3Wvqc50KwityO0Rs8GZJD6lb2yKvRlK8j/MKnimYVpwhPkxpihxiCiefeuN4YqFuc9yqW8JC5gbDbpXOlde3pIrp2Xk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571209056; h=Content-Type:Date:From:MIME-Version:Message-ID:References:Subject:To; bh=nuIQQMEK8R8J8YuPL/9rlVPtW9jZfs3T+8tszZjHLDE=; b=gatVmrMUSMndVkrdx16MZZOl1xHYLQnv3MTk4bttD6hs0A4g9MlfFMjkbeUo0nXSnQYYAjnObcFDC0FmE9Ele5zt1SKMdh41UGTW/0c+JE8N5W1QYmIeIeGgQ/69VvmUEAoPh+nTApda8bA9oZ83gQks+/8a1g+5ywCqfeStNG4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=highgo.ca; spf=pass smtp.mailfrom=movead.li@highgo.ca; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1571209056; s=zoho; d=highgo.ca; i=movead.li@highgo.ca; h=Date:From:To:Subject:References:Mime-Version:Message-ID:Content-Type; l=4084; bh=nuIQQMEK8R8J8YuPL/9rlVPtW9jZfs3T+8tszZjHLDE=; b=CjE7Mmkwcz7li/DqS5OH4yuGSg7WW5DwEe9dPYswDxs1WDllInYp/4X/VpoJNUW9 OaZ+o8y1crZ32zUxnpaEeCGQ0+8JnEjwhtLxZRE+cefHAjqDREXAWXDrsb5lVXVMeiA z7gxMFGOQiXKtdaZrZspiKmT1B19B8J06XvByNwM= Received: from deepin (124.133.18.218 [124.133.18.218]) by mx.zohomail.com with SMTPS id 1571209054814536.4031687894424; Tue, 15 Oct 2019 23:57:34 -0700 (PDT) Date: Wed, 16 Oct 2019 14:57:33 +0800 From: "movead.li@highgo.ca" To: "Andres Freund" , pgsql-bugs Subject: Re: Re: BUG #15929: logical decoding can not write down the analyse result when the output file is touched. References: <15929-ee2973046b882ad0@postgresql.org>, <20190927213546.njzvegpdkgcxeka4@alap3.anarazel.de> X-Priority: 3 X-Has-Attach: no X-Mailer: Foxmail 7, 2, 7, 174[cn] Mime-Version: 1.0 Message-ID: <2019101614573142796519@highgo.ca> Content-Type: multipart/alternative; boundary="----=_001_NextPart052562071055_=----" X-ZohoMailClient: External List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. ------=_001_NextPart052562071055_=---- Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 DQogDQo+SSBkb24ndCBzZWUgYSBidWcgaGVyZS4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JTDogbWFpbHRvOm1vdmVhZChkb3QpbGkoYXQpaGlnaGdvKGRvdCljYQ0K ------=_001_NextPart052562071055_=---- Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =0A

=0A
 
=0A
>I don't see a bug here. It's completely= normal for a tool that writes to
=0A
>a file to continue writ= ing into the file it started to write to. The
=0A
>reason that= vi breaks that is presumably just that it renames the
=0A
>"e= dited" version into the place of the file that pg_recvlogical is still=0A
>writing to.
=0A

It is the is= sue that the target file is changed but=  the 'pg_recvlogical'
process doesn't know&nbs= p;it at all. So it streams all wal = ;changes but writes 
down nothing at last= .

So I think we can recreate or = reopen the changed file when there be
som= ething wrong with the target file. And = we can choose to kill the 
'pg_recvlogica= l' process because it's no use at all&n= bsp;now, or we should
give a warning to&n= bsp;users at lease.

---
Highgo Software (Canada/China/Pakistan) 
URL : www.h= ighgo.ca 
EMAIL: mailto:movead(dot)li(at)highgo(dot)ca
=0A=0A ------=_001_NextPart052562071055_=------