Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XF6Re-00072M-Hf for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Aug 2014 19:00:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XF6Re-0008Ol-1Z for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Aug 2014 19:00:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XF6Rd-0008OA-6i for pgsql-hackers@postgresql.org; Wed, 06 Aug 2014 19:00:17 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XF6RW-0007r1-VV for pgsql-hackers@postgresql.org; Wed, 06 Aug 2014 19:00:14 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 0C97428647; Wed, 6 Aug 2014 12:00:05 -0700 (PDT) Received: from EX13-CAS-005.vmware.com (EX13-CAS-005.vmware.com [10.113.191.55]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 055B7B02C0; Wed, 6 Aug 2014 12:00:05 -0700 (PDT) Received: from EX13-MBX-024.vmware.com (10.113.191.44) by EX13-MBX-001.vmware.com (10.113.191.21) with Microsoft SMTP Server (TLS) id 15.0.775.38; Wed, 6 Aug 2014 11:59:45 -0700 Received: from [192.168.1.90] (10.113.160.246) by EX13-MBX-024.vmware.com (10.113.191.44) with Microsoft SMTP Server (TLS) id 15.0.775.38; Wed, 6 Aug 2014 11:59:45 -0700 Message-ID: <53E27B13.50506@vmware.com> Date: Wed, 6 Aug 2014 21:59:31 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: Fujii Masao , PostgreSQL-development Subject: Re: posix_fadvise() and pg_receivexlog References: In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.113.160.246] X-ClientProxiedBy: EX13-CAS-013.vmware.com (10.113.191.65) To EX13-MBX-024.vmware.com (10.113.191.44) X-Pg-Spam-Score: -7.6 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 08/06/2014 08:39 PM, Fujii Masao wrote: > Hi, > > The WAL files that pg_receivexlog writes will not be re-read soon basically, > so we can advise the OS to release any cached pages when WAL file is > closed. I feel inclined to change pg_receivexlog that way. Thought? -1. The OS should be smart enough to not thrash the cache by files that are written sequentially and never read. If we go down this path, we'd need to sprinkle posix_fadvises into many, many places. Anyway, who are we to say that they won't be re-read soon? You might e.g have a secondary backup site where you copy the files received by pg_receivexlog, as soon as they're completed. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers