Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKPN5-0006Fh-9U for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Nov 2018 15:03:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gKPN3-0007qw-QW for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Nov 2018 15:03:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKPN3-0007qp-Cq for pgsql-hackers@lists.postgresql.org; Wed, 07 Nov 2018 15:03:53 +0000 Received: from mail-yb1-xb42.google.com ([2607:f8b0:4864:20::b42]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gKPMs-0003Et-E0 for pgsql-hackers@postgresql.org; Wed, 07 Nov 2018 15:03:52 +0000 Received: by mail-yb1-xb42.google.com with SMTP id n140-v6so6958294yba.1 for ; Wed, 07 Nov 2018 07:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=B2NJqqPc3MKFNtutl6td0tumh9YNNfWOADfmzJX5d7Y=; b=Fl88iKjo9Kdtg/0K2emThA3lN1uNHa5Skm3f0mKUFdYWt2rpw9sZZAC2yR/Oj87vFn cFtslZ8b5MFOzVwaRjXASHc5c/jV2SG7fFRiUP+Am3ubxFZv+0ka7CzjkBLOOe1Ybsca klKjdxNkioSWMDX0VX4VPRYADNytFaRoTKUGv+QxJcFlutAzKSUKp0dpkxNV+ILxob7E C/vMnbKLjGyMsTOC0NQ1GJ8l/vSNXoi0zNF/S+VoDTvLrxsTokLo7di7OBzT2L9AMyWg PEAP3xw7Z4j/QZdZqFpCn88+UMyRZHoLo9rdvY1GVuKGk9oWG2Gi3yAogJcvc35XVD0Q LbYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=B2NJqqPc3MKFNtutl6td0tumh9YNNfWOADfmzJX5d7Y=; b=neyHeSoJqcXrcPkzPDkwvWBYvdRfKmbN2jPZbzVvjk0DehBeBn9tvCUK1GvDcV/muK gpKhdpyrKqUiw6r/K+Reav1dKBfpIanoWNl9doyVfg0pnf2YXMw6EU+pb91IWt6bvJQA sl/a2ptNh8aUDnmwHg41lKByYhmUAR8iFytnTJqn2n5tdIwIgKkbSAc9EM+7tocinCyF m+lYGnDoysu7ZmHHvDvTIzP1nsoLaz/+TZRIk7E5BdNjP342PsxAZy6VwWsMY1HA5Lox dgU0e5K7vIQ/2I6R4rGjQjUyC3MZSrj6VSubPxXyejqlvL93f3a1MhbryhE1WKgh8GNi D+AA== X-Gm-Message-State: AGRZ1gLPzn6b11ei2jRlFPY80nefsaTnrIOucpeX/MkKrD41fJ33QNa2 JX6uotv4zt+Qta8drdGjUqn4 X-Google-Smtp-Source: AJdET5d9O9magata9LJzQrcMxNMusb3+cfNe139xt/bCc6FUAi0fFTF3/WmPC61S6QVMeNXaE+gMcw== X-Received: by 2002:a25:144:: with SMTP id 65-v6mr621485ybb.54.1541603021526; Wed, 07 Nov 2018 07:03:41 -0800 (PST) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id k192-v6sm696534ywk.99.2018.11.07.07.03.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 07:03:40 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pread() and pwrite() To: Tom Lane Cc: jesper.pedersen@redhat.com, Thomas Munro , Alvaro Herrera , Magnus Hagander , Oskari Saarenmaa , Pg Hackers , Tobias Oberstein References: <20181105155918.jg36uj4rtnxwqtzt@alvherre.pgsql> <1791.1541438632@sss.pgh.pa.us> <856530e2-260d-1d61-ec18-595778868a1b@redhat.com> <4ab64856-6822-ec37-934f-baab06413233@2ndQuadrant.com> <26123.1541601037@sss.pgh.pa.us> Message-ID: <6b69fc80-03c2-b445-907d-89cdbde7f1fa@2ndQuadrant.com> Date: Wed, 7 Nov 2018 10:03:39 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <26123.1541601037@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/7/18 9:30 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On 11/7/18 7:26 AM, Jesper Pedersen wrote: >>> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2018-11-07%2001%3A01%3A01 >> And lousyjack, which uses a slightly different way of calling valgrind, >> and thus got past initdb, found a bunch more: >> > I'm confused by this. Surely the pwrite-based code is writing exactly the > same data as before. Do we have to conclude that valgrind is complaining > about passing uninitialized data to pwrite() when it did not complain > about exactly the same thing for write()? > > [ looks ... ] No, what we have to conclude is that the write-related > suppressions in src/tools/valgrind.supp need to be replaced or augmented > with pwrite-related ones. Yeah. I just trawled through the lousyjack logs and it looks like all the cases it reported could be handled by: {     padding_XLogRecData_pwrite     Memcheck:Param     pwrite64(buf)     ...     fun:XLogWrite } cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services