Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110328 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 95257 invoked from network); 1 Jun 2020 19:11:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jun 2020 19:11:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7F8E8180543 for ; Mon, 1 Jun 2020 10:53:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 1 Jun 2020 10:53:15 -0700 (PDT) Received: by mail-ot1-f53.google.com with SMTP id v13so1884023otp.4 for ; Mon, 01 Jun 2020 10:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OhFxbYu9gnn9JLjsOcyF/4sFCArs34V09D8OgItn1Og=; b=dEmzTH3Kc9QtJPAEzsVvroPr2MzOpSXGXacUhvRgjVobbmpxIH6k/E+mY1wi2Ls4du uq4szAj8DsIje288HuLhx8dZeZ8J80cLksyg7sV9GaiEi9mIiLOh9lmHEknbYrmhxQ8m vemahWBhkh8xyKrunIgdZLxRU499moNqtzYcmklYIhHBgbhqHrGXpeVKs+hSHyOga/CR qjeepfrRDWq/22oZY6bcq2fkukHruDIcvwCBy3GKt/Vjjg0diVPfALUPg8Bk11Ypv2so 2d3n8+rklfI2wwbr1gHWB+pp9xdPE2LDgPvZshFplaAiBvloNPem2Kjc6/OtY8zKT3Rw 6ATg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OhFxbYu9gnn9JLjsOcyF/4sFCArs34V09D8OgItn1Og=; b=ocxdKpo5TKz8tlt66s0yE7w3dp9PJURhSGavIdCFM6r0hSvLUhLyr9AzvpOQusWcnN 65F32TBAq1tTKglU9vUjl7NzmartTo84BCdmV9LdwaIWo6POKqFM8cegHdkHdqv0CfYi v0m1cXWtfLyzY8lnlkEM0nlfE1Y3adND5VepPzvEGSfdidH6kK6vAsefBPIXSx8gFQ0J u8r14iw2RGAZ9+vsay5qOCNhUYIj+XiaXpnNoUjVM5elqCULc/YXl/u/G5gsYaklIamZ ie6jdCcCpUE3EYL0+AhRwBxn67SOxdgiAr4VGbKGKWB4RzzFS3h8msTBDl5mMJv/IvdS BNBA== X-Gm-Message-State: AOAM533/VYK6yFy+Yyqpvx0UTmkDbQHLAmhxq8km5WCWA83h/LsqijIB JifAR080mMoN5fNIAGn6+67K6luHApC1rJJ7M8vTLg== X-Google-Smtp-Source: ABdhPJyxQ546ITmsbu7gsYSjM0l5pHoioxy2T51FjM/m3mnDw+g1yhGg/h/qshB54KEvc9cS89uVuVES7wRQUqJw0mM= X-Received: by 2002:a9d:27a3:: with SMTP id c32mr18582201otb.233.1591033994602; Mon, 01 Jun 2020 10:53:14 -0700 (PDT) MIME-Version: 1.0 References: <9653428e-643a-cfb1-4966-c1f32db2ab0e@birkholz.biz> In-Reply-To: <9653428e-643a-cfb1-4966-c1f32db2ab0e@birkholz.biz> Date: Mon, 1 Jun 2020 18:52:58 +0100 Message-ID: To: Dennis Birkholz Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000130f7005a70978e1" Subject: Re: [PHP-DEV] RFC proposal: fsync support for file resources From: davidgebler@gmail.com (David Gebler) --000000000000130f7005a70978e1 Content-Type: text/plain; charset="UTF-8" No, fflush will flush the PHP application buffers out to the operating system, it does in contrast to fsync not provide a guarantee the operating system will immediately persist to the underlying storage device. On Mon, 1 Jun 2020, 18:49 Dennis Birkholz, wrote: > Hello David, > > isn't fflush exactly this: > https://www.php.net/manual/en/function.fflush.php > > Greets > Dennis > > Am 01.06.20 um 18:56 schrieb David Gebler: > > Exactly as the subject says, I would like to propose an RFC for adding an > > fsync() function for file resources, which would in essence be a thin > > wrapper around C's fsync on UNIX systems and _commit on Windows. > > > > It seems to me an odd oversight that this has never been implemented in > PHP > > and means PHP has no way to perform durable file write operations, making > > it inherently unsuitable for any systems requiring more intensive I/O, > > mission critical logs, auditing, etc. > > > > I am not really a C programmer and I have been able to implement a simple > > working prototype of this as a compiled extension in merely a few hours, > so > > I'm sure it wouldn't be difficult to bring in to the language core where > > the functionality really belongs. > > > > Every other major programming language otherwise comparable to PHP in > > features supports a way of providing durability. > > > > Thanks. > > > > --000000000000130f7005a70978e1--