Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rlBSJ-000ccp-76 for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Mar 2024 17:34:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rlBSE-00AyGK-O8 for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Mar 2024 17:34:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rl4H3-007eIg-Tj for pgsql-bugs@lists.postgresql.org; Fri, 15 Mar 2024 09:54:50 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rl4H1-004dSr-9O for pgsql-bugs@postgresql.org; Fri, 15 Mar 2024 09:54:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oculeus.com; s=s1-ionos; t=1710496485; x=1711101285; i=baranowski@oculeus.com; bh=IS0HhX9y9UH/TwzLBxM6hPX8AQ1dctHyh2k57tGvDZ0=; h=X-UI-Sender-Class:Subject:From:In-Reply-To:Date:Cc:References: To; b=l4aXfdd8cL4hhEgfF5OLJKmxLuaOG8rtFncdHh6WgbycAfTMK6rpmTEl50vLStPn UxTD88L1OT+l9sqTsGBHNltlx3vfZtyIsLskoBF2aI8H+e2WUM95O1oy3iwQ18MWo szcjYHP0ZWU+aOLI0SvWWrxND/tFrXXv3UNnMBOIiqyBno2aysn2c/VDos/A6hRUC c3stniom79opy1PUs6Rr3zqw27OpWGgm+fpBxbrKaZrwp7dh8sJwRPlGYCxUr8LAX kUjk0iJmmwlJrY8tzv+jV2J1Fr7w5rFZxx+mHn64a9nY2RSc09Mowjm7zKP8ZmHpL jPXrzZnWHVXtT3wwBA== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from smtpclient.apple ([95.222.250.86]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MA7Ss-1rf2el0NFi-00BYHm; Fri, 15 Mar 2024 10:54:45 +0100 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\)) Subject: Re: PostgreSQL & latest Mac OS Sonoma, a possible bug / configuration issue From: Arnd Baranowski In-Reply-To: <319901.1707185894@sss.pgh.pa.us> Date: Fri, 15 Mar 2024 10:54:34 +0100 Cc: pgsql-bugs@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <511C6F2F-1416-44A4-AFCF-FCD690C91750@oculeus.com> References: <269596.1707165898@sss.pgh.pa.us> <319901.1707185894@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3774.400.31) X-Provags-ID: V03:K1:tWR4b9v8qU87fzPsrrf8sKW4d1y1Jm9vQusVSpuULwP3VHaB8J3 oUtjieOKvYIL4SiJmMCRHosq3PsGXrVcwQP4nkAks0ir6FRd8zj8PWCDc820Po6r1tYEZA0 hKlgGH21md59Hof50t816Rtv+vmWdUV65ILytYZQDKX37Yk9N1vBSgn68E9R8ifPpqMgD9s BP4rQL7kudpNNnDCEKx+w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3FOavPSUvzo=;YYSBILfVn+2Ql9EWg5knHJ2XLQm HBtdz/gKf6/8Y2gikswOijmZWq8eOaP032hCpRmAW/zUpfGicRnvyZWIY3+G8Ld1A0VNey3Li XQTPB0hg+bWiXhGi5SohqBNPzEpff1qcjZZW+Z2znbqDsgmPNbpxTAnOTy6ep8lKbtAHajcXN WCppygs+EcM9rIyS5pZ97HQd3bXDyadGu1mYRUaiOE8cT8QGSsFtFW5kdiczcooTlHLPFsU4a v+nnuoiCuBdUQqHuCmiixbIT6NqDQIlaUbZ6WUhHkgB2idA+s0Tlrohm/x/o7D/zY2nM8MYrR 5xz2G4lfB/KCJ4fQAf/16UHrbgmherdQJbwCgkKaiXld2hudDPyCKsN/VQXnwbfYTaJKegNAm yXyhEx2wqldS45etT3wMZinN/3rs6WFam4rliFpDmJr6d1pib6DylF7sVH0FXs95MBOi7wHNv G1a+39B8jyiinilpZgNKgpbzUmTv/tzaO9VkS2fSmrrm3d3+IAA4wSRYINuzu+iuOEJ30/LPb 2+wlFLWEk8HT5r9wkI5Ow/xz8Xbqs2Tn2+l5/eupmrj+Sp5dwVT1NhiB2Q0RbrNuGoSRvz9Ur TEOOGerwvVBESQ6va7M+PAX8mgHjBwZK72gxm2OC0AWmPFM5c3g7GMcQfDTbMoS1AdsmSiwQ6 wdof0gALqwPEFfDuQfSiq1gpNSnA1ohWwm2gUwfAJDu5sP4mqZtmjQZasbnSZ4Lu+xARG9b8F EEaDT2QdJcWSn9YcA+9+CItn10jbujvciqhzX0ccwgdEXl7/umNpD0= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Tom, I completely deleted my Mac installation of Postgres and Brew. = Reinstalled everything from scratch and moved to PostgreSQL16. The issue = is gone. It looks like a screwed PostgreSQL14 installation caused the = problem. Regards Arnd --- Hi Tom, Thanks for the feedback and insights. I will follow your advice, observe = and report if I find something which could explain this behavior Regard Arnd > Am 06.02.2024 um 03:18 schrieb Tom Lane : >=20 > Arnd Baranowski writes: >> Correction fsync is =E2=80=9EOn" and the wal_sync_method is set to = =E2=80=9Eopen_datasync=E2=80=9C >=20 > That's what they should be. >=20 > I tried to reproduce this by selecting "Restart..." immediately after > creating/populating a table on my own MacBook running Sonoma 14.3. > After the reboot, the table was there with the expected contents. > Now, this test doesn't actually prove a heck of a lot about PG's > crash recovery, because I see in the postmaster log >=20 > 2024-02-05 21:00:30.322 EST [1148] LOG: database system was shut down = at 2024-02-05 20:58:46 EST > 2024-02-05 21:00:30.327 EST [1144] LOG: database system is ready to = accept connections >=20 > which indicates that Postgres had time to perform a clean shutdown > before the system rebooted. (That is the expected scenario for an > OS reboot, assuming that the kernel delivers us SIGTERM as it's > required to do by POSIX and then gives us enough time to nail the > windows shut, which it's not required to do.) >=20 > The facts as you've presented them indicate that (1) checkpoints > weren't working, (2) we didn't get SIGTERM at system shutdown, *and* > (3) WAL wasn't written out to disk as it's supposed to be. It's > a bit hard to credit that so many things are broken and nobody has > noticed. I'm inclined to wonder if something is wrong with your > disk drive. >=20 > It would be interesting to know what appears in the first few lines > of your postmaster log after a data-losing restart. Also, try > running with log_checkpoints =3D on for awhile, and see if there are > log entries claiming successful checkpoint completion. >=20 > A different line of thought is that maybe the corruption is happening > because you have two postmasters started in the same data directory. > We have interlocks that are supposed to defend against that, but it'd > be a lot easier to credit that those aren't working than that all the > rest of this stuff broke. >=20 > regards, tom lane