Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fOqDw-0000Ah-IE for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Jun 2018 20:00:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fOqDs-0001j0-Ef for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Jun 2018 20:00:28 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fOqDs-0001ir-5T for pgsql-bugs@lists.postgresql.org; Fri, 01 Jun 2018 20:00:28 +0000 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fOqDn-0007Bt-P2 for pgsql-bugs@lists.postgresql.org; Fri, 01 Jun 2018 20:00:27 +0000 Received: by mail-lf0-x241.google.com with SMTP id r2-v6so16473815lff.4 for ; Fri, 01 Jun 2018 13:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=jAdEd8dDzXSSczsHsYSAzWc/bGwEX4cWjIizGplGLcw=; b=Ukfs94Lxue1I5OEoux0K0P9lsq2FPe/IrR+iIhA+da9mA5q73N1F0wZXsaHb6g3bKd 5N/Zzlw9A64flVZhjbgbXF4AnmL4wBv0gX1jxYVB0q34SO0tIpkn0ae0Zdd530RCRACb rV7Y7OiUa4V7K/NRtKGdoqScmUIW0nq9KJeHVDjrRxT00abLlkuAXpXJ6w1NPsylhInr YVRXY5cvUl/z3IQG/wJzqeBTHXMLZWJw7P7q82QQmd7xaPF6pgxU+jpdisrBk+/5/9G3 5VKqADFQGUkeBwcEw8Cbtprak++avmO4YyipD2UAbQVpFiGDCUU66SxUFnO8yYLwsr1J gOcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=jAdEd8dDzXSSczsHsYSAzWc/bGwEX4cWjIizGplGLcw=; b=da/4eNyrkQ8iN6YSlqSTqIO2TDTxZMQEZMVPgMmC6WB1Vuc0UN2qn+SaA3Ch8caPD3 n8FJU5N42V6KG0A6CiyPKNX5O7VDWsX6RrDKvX98PFGItg7wvDf/QmZeZLz2lgT4MFa8 TkGEHaDpLl3OTxsIdcEV2kgaqoy1FiozfoJpr2GdefmLBtBLvTwC+kY180W1lEKZf2Jv 8ZeJUI1F+qnzNyjgXmlrTTSxSKy0JOMOFc+m+SpnJ7qWCi35iYAAn7esiyL9J6x02+uR cSdAueOTnwBBUrAVHZxcqPxqVzEgMYHGJfuipSGsSU4Rrg6BU/XNZJVSEl/S5JuDKdzQ dlTg== X-Gm-Message-State: ALKqPwcUMT/TJikqWNhE+HUWhBK6wi+yVMvUM/XG8UDc329VDsGRuYl6 e5aL+PsK589fY1Rksvb/r46NGw== X-Google-Smtp-Source: ADUXVKJdInxdpZq68q8ZH69USA5ysI10TZj2Q1YPcKNZEYG85kvas87BComwk2U0T2MNhDCG9J37IQ== X-Received: by 2002:a19:8e01:: with SMTP id q1-v6mr6836201lfd.35.1527883222874; Fri, 01 Jun 2018 13:00:22 -0700 (PDT) Received: from [1.0.0.7] ([178.155.4.53]) by smtp.gmail.com with ESMTPSA id x68-v6sm864108lfb.25.2018.06.01.13.00.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 13:00:21 -0700 (PDT) Subject: Re: BUG #15217: Valgrind - writing uninitialised byte(s) in FileWrite From: Alexander Lakhin To: Peter Geoghegan , PostgreSQL mailing lists References: <152765297018.1287.16667772151157129465@wrigleys.postgresql.org> <63d8e998-d7ea-77d2-67ff-364e21909dc2@gmail.com> Message-ID: <29aaaee6-c0f7-0fa1-e0c8-c72403c3bb7f@gmail.com> Date: Fri, 1 Jun 2018 23:00:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <63d8e998-d7ea-77d2-67ff-364e21909dc2@gmail.com> Content-Type: multipart/mixed; boundary="------------8AA61F4F3015A9596D99D3C4" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------8AA61F4F3015A9596D99D3C4 Content-Type: multipart/alternative; boundary="------------E514F33FA002D9BCA8808177" --------------E514F33FA002D9BCA8808177 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 30.05.2018 09:35, Alexander Lakhin wrote: > 30.05.2018 08:54, Peter Geoghegan wrote: >> This looks like the same harmless warning that we suppressed for >> parallel sort in Postgres 11 (see commits 9fafa413ac6 and >> de6428afe13). This happens to be a serial sort in Postgres 10, but the >> fact that it's still possible there isn't surprising. >> >> What's your work_mem setting? Can you show EXPLAIN ANALYZE output for the query? > > Thanks for the answer! > > The work_mem setting is 4MB. To get EXPLAIN ANALYZE is rather > difficult as I get these errors while running pg_tcpds for hours, but > I'll try to catch the query. I will also try to play with work_mem and > to apply the aforementioned patches to REL_10_STABLE. > I've managed to reproduce this warning with pg_tpch. The "problematic" query: https://github.com/tvondra/pg_tpch/blob/master/dss/templates/10.sql EXPLAIN ANALYZE: QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  Limit  (cost=178881.96..178882.01 rows=20 width=202) (actual time=41708.427..41708.994 rows=20 loops=1)    ->  Sort  (cost=178881.96..179020.08 rows=55249 width=202) (actual time=41706.775..41706.828 rows=20 loops=1)          Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC          Sort Method: top-N heapsort  Memory: 34kB          ->  Finalize GroupAggregate (cost=170313.58..177411.81 rows=55249 width=202) (actual time=27586.165..40109.437 rows=37948 loops=1)                Group Key: customer.c_custkey, nation.n_name                ->  Gather Merge (cost=170313.58..176260.79 rows=46040 width=202) (actual time=27570.718..33645.648 rows=37948 loops=1)                      Workers Planned: 2                      Workers Launched: 2                      ->  Partial GroupAggregate (cost=169313.56..169946.61 rows=23020 width=202) (actual time=26845.343..34327.273 rows=12649 loops=3)                            Group Key: customer.c_custkey, nation.n_name                            ->  Sort (cost=169313.56..169371.11 rows=23020 width=182) (actual time=26801.917..27406.584 rows=38258 loops=3)                                  Sort Key: customer.c_custkey, nation.n_name                                  Sort Method: external sort  Disk: 7016kB                                  ->  Hash Join (cost=35074.91..165598.19 rows=23020 width=182) (actual time=8882.471..24071.174 rows=38258 loops=3)                                        Hash Cond: (customer.c_nationkey = nation.n_nationkey)                                        ->  Nested Loop (cost=35073.35..165314.18 rows=23020 width=164) (actual time=8833.355..23146.172 rows=38258 loops=3)                                              ->  Merge Join  (cost=35072.92..42628.04 rows=23461 width=156) (actual time=8823.262..13619.941 rows=19073 loops=3)                                                    Merge Cond: (customer.c_custkey = orders.o_custkey)                                                    -> Parallel Index Scan using customer_pkey on customer (cost=0.42..6742.42 rows=62500 width=152) (actual time=13.463..1101.789 rows=50000 loops=3)                                                    -> Materialize  (cost=35072.48..35354.01 rows=56306 width=12) (actual time=8795.265..10510.505 rows=57105 loops=3) ->  Sort  (cost=35072.48..35213.24 rows=56306 width=12) (actual time=8790.529..9667.322 rows=57105 loops=3) Sort Key: orders.o_custkey Sort Method: external merge  Disk: 1256kB ->  Bitmap Heap Scan on orders  (cost=1197.56..29667.15 rows=56306 width=12) (actual time=273.899..6733.885 rows=57218 loops=3) Recheck Cond: ((o_orderdate >= '1993-07-01'::date) AND (o_orderdate < '1993-10-01 00:00:00'::timestamp without time zone)) Rows Removed by Index Recheck: 430095 Heap Blocks: exact=15937 lossy=8327 ->  Bitmap Index Scan on idx_orders_orderdate (cost=0.00..1183.49 rows=56306 width=0) (actual time=225.114..225.114 rows=57218 loops=3) Index Cond: ((o_orderdate >= '1993-07-01'::date) AND (o_orderdate < '1993-10-01 00:00:00'::timestamp without time zone))                                              ->  Index Scan using idx_lineitem_orderkey on lineitem  (cost=0.43..5.19 rows=4 width=20) (actual time=0.372..0.448 rows=2 loops=57218)                                                    Index Cond: (l_orderkey = orders.o_orderkey)                                                    Filter: (l_returnflag = 'R'::bpchar)                                                    Rows Removed by Filter: 2                                        ->  Hash (cost=1.25..1.25 rows=25 width=30) (actual time=31.890..31.890 rows=25 loops=3)                                              Buckets: 1024 Batches: 1  Memory Usage: 10kB                                              ->  Seq Scan on nation  (cost=0.00..1.25 rows=25 width=30) (actual time=6.582..8.616 rows=25 loops=3)  Planning time: 689.897 ms  Execution time: 41835.301 ms (39 rows) (The work_mem setting was decreased to 1MB.) Valgrind logs of the three backends affected are attached. After applying the changes from 9fafa413ac6 and de6428afe13 I don't see this warning. Best regards, ------ Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------E514F33FA002D9BCA8808177 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
30.05.2018 09:35, Alexander Lakhin wrote:
30.05.2018 08:54, Peter Geoghegan wrote:
This looks like the same harmless warning that we suppressed for
parallel sort in Postgres 11 (see commits 9fafa413ac6 and
de6428afe13). This happens to be a serial sort in Postgres 10, but the
fact that it's still possible there isn't surprising.

What's your work_mem setting? Can you show EXPLAIN ANALYZE output for the query?

Thanks for the answer!

The work_mem setting is 4MB. To get EXPLAIN ANALYZE is rather difficult as I get these errors while running pg_tcpds for hours, but I'll try to catch the query. I will also try to play with work_mem and to apply the aforementioned patches to REL_10_STABLE.

I've managed to reproduce this warning with pg_tpch.
The "problematic" query: https://github.com/tvondra/pg_tpch/blob/master/dss/templates/10.sql
EXPLAIN ANALYZE:
                                                                                                  QUERY PLAN                                                                                                 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=178881.96..178882.01 rows=20 width=202) (actual time=41708.427..41708.994 rows=20 loops=1)
   ->  Sort  (cost=178881.96..179020.08 rows=55249 width=202) (actual time=41706.775..41706.828 rows=20 loops=1)
         Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
         Sort Method: top-N heapsort  Memory: 34kB
         ->  Finalize GroupAggregate  (cost=170313.58..177411.81 rows=55249 width=202) (actual time=27586.165..40109.437 rows=37948 loops=1)
               Group Key: customer.c_custkey, nation.n_name
               ->  Gather Merge  (cost=170313.58..176260.79 rows=46040 width=202) (actual time=27570.718..33645.648 rows=37948 loops=1)
                     Workers Planned: 2
                     Workers Launched: 2
                     ->  Partial GroupAggregate  (cost=169313.56..169946.61 rows=23020 width=202) (actual time=26845.343..34327.273 rows=12649 loops=3)
                           Group Key: customer.c_custkey, nation.n_name
                           ->  Sort  (cost=169313.56..169371.11 rows=23020 width=182) (actual time=26801.917..27406.584 rows=38258 loops=3)
                                 Sort Key: customer.c_custkey, nation.n_name
                                 Sort Method: external sort  Disk: 7016kB
                                 ->  Hash Join  (cost=35074.91..165598.19 rows=23020 width=182) (actual time=8882.471..24071.174 rows=38258 loops=3)
                                       Hash Cond: (customer.c_nationkey = nation.n_nationkey)
                                       ->  Nested Loop  (cost=35073.35..165314.18 rows=23020 width=164) (actual time=8833.355..23146.172 rows=38258 loops=3)
                                             ->  Merge Join  (cost=35072.92..42628.04 rows=23461 width=156) (actual time=8823.262..13619.941 rows=19073 loops=3)
                                                   Merge Cond: (customer.c_custkey = orders.o_custkey)
                                                   ->  Parallel Index Scan using customer_pkey on customer  (cost=0.42..6742.42 rows=62500 width=152) (actual time=13.463..1101.789 rows=50000 loops=3)
                                                   ->  Materialize  (cost=35072.48..35354.01 rows=56306 width=12) (actual time=8795.265..10510.505 rows=57105 loops=3)
                                                         ->  Sort  (cost=35072.48..35213.24 rows=56306 width=12) (actual time=8790.529..9667.322 rows=57105 loops=3)
                                                               Sort Key: orders.o_custkey
                                                               Sort Method: external merge  Disk: 1256kB
                                                               ->  Bitmap Heap Scan on orders  (cost=1197.56..29667.15 rows=56306 width=12) (actual time=273.899..6733.885 rows=57218 loops=3)
                                                                     Recheck Cond: ((o_orderdate >= '1993-07-01'::date) AND (o_orderdate < '1993-10-01 00:00:00'::timestamp without time zone))
                                                                     Rows Removed by Index Recheck: 430095
                                                                     Heap Blocks: exact=15937 lossy=8327
                                                                     ->  Bitmap Index Scan on idx_orders_orderdate  (cost=0.00..1183.49 rows=56306 width=0) (actual time=225.114..225.114 rows=57218 loops=3)
                                                                           Index Cond: ((o_orderdate >= '1993-07-01'::date) AND (o_orderdate < '1993-10-01 00:00:00'::timestamp without time zone))
                                             ->  Index Scan using idx_lineitem_orderkey on lineitem  (cost=0.43..5.19 rows=4 width=20) (actual time=0.372..0.448 rows=2 loops=57218)
                                                   Index Cond: (l_orderkey = orders.o_orderkey)
                                                   Filter: (l_returnflag = 'R'::bpchar)
                                                   Rows Removed by Filter: 2
                                       ->  Hash  (cost=1.25..1.25 rows=25 width=30) (actual time=31.890..31.890 rows=25 loops=3)
                                             Buckets: 1024  Batches: 1  Memory Usage: 10kB
                                             ->  Seq Scan on nation  (cost=0.00..1.25 rows=25 width=30) (actual time=6.582..8.616 rows=25 loops=3)
 Planning time: 689.897 ms
 Execution time: 41835.301 ms
(39 rows)

(The work_mem setting was decreased to 1MB.)
Valgrind logs of the three backends affected are attached.

After applying the changes from 9fafa413ac6 and de6428afe13 I don't see this warning.

Best regards,

------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


--------------E514F33FA002D9BCA8808177-- --------------8AA61F4F3015A9596D99D3C4 Content-Type: text/x-log; name="postmaster-86.log" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="postmaster-86.log" ==00:00:05:02.191 86== Memcheck, a memory error detector ==00:00:05:02.191 86== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==00:00:05:02.191 86== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==00:00:05:02.191 86== Command: /usr/local/pgsql/bin/../obin/postmaster -D /var/lib/postgresql/main -c config_file=/var/lib/postgresql/main/postgresql.conf ==00:00:05:02.191 86== Parent PID: 14 ==00:00:05:02.191 86== ==00:00:05:13.235 86== Syscall param write(buf) points to uninitialised byte(s) ==00:00:05:13.235 86== at 0x4E4D281: write (write.c:27) ==00:00:05:13.235 86== by 0x487ACF: FileWrite (fd.c:1773) ==00:00:05:13.235 86== by 0x489CB1: BufFileDumpBuffer (buffile.c:324) ==00:00:05:13.235 86== by 0x48A164: BufFileFlush (buffile.c:466) ==00:00:05:13.235 86== by 0x48A164: BufFileRead (buffile.c:372) ==00:00:05:13.235 86== by 0x5FAC68: ltsReadBlock (logtape.c:248) ==00:00:05:13.235 86== by 0x5FAD4C: ltsReadFillBuffer (logtape.c:275) ==00:00:05:13.235 86== by 0x60337D: mergeruns (tuplesort.c:2683) ==00:00:05:13.235 86== by 0x60337D: tuplesort_performsort (tuplesort.c:1823) ==00:00:05:13.235 86== by 0x395B42: ExecSort (nodeSort.c:117) ==00:00:05:13.235 86== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.235 86== by 0x38D8D3: ExecProcNode (executor.h:250) ==00:00:05:13.235 86== by 0x38D8D3: ExecMaterial (nodeMaterial.c:134) ==00:00:05:13.235 86== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.235 86== by 0x38EC87: ExecProcNode (executor.h:250) ==00:00:05:13.235 86== by 0x38EC87: ExecMergeJoin (nodeMergejoin.c:704) ==00:00:05:13.235 86== Address 0xf3a7928 is 2,840 bytes inside a block of size 8,256 client-defined ==00:00:05:13.235 86== at 0x5F5B50: palloc (mcxt.c:872) ==00:00:05:13.235 86== by 0x489EBF: makeBufFile (buffile.c:107) ==00:00:05:13.235 86== by 0x489EBF: BufFileCreateTemp (buffile.c:175) ==00:00:05:13.235 86== by 0x5FAE24: LogicalTapeSetCreate (logtape.c:390) ==00:00:05:13.235 86== by 0x6019AC: inittapes (tuplesort.c:2410) ==00:00:05:13.235 86== by 0x6019AC: puttuple_common (tuplesort.c:1622) ==00:00:05:13.235 86== by 0x602CA3: tuplesort_puttupleslot (tuplesort.c:1375) ==00:00:05:13.235 86== by 0x395B20: ExecSort (nodeSort.c:111) ==00:00:05:13.235 86== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.235 86== by 0x38D8D3: ExecProcNode (executor.h:250) ==00:00:05:13.235 86== by 0x38D8D3: ExecMaterial (nodeMaterial.c:134) ==00:00:05:13.235 86== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.235 86== by 0x38EC87: ExecProcNode (executor.h:250) ==00:00:05:13.235 86== by 0x38EC87: ExecMergeJoin (nodeMergejoin.c:704) ==00:00:05:13.235 86== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.235 86== by 0x392D0E: ExecProcNode (executor.h:250) ==00:00:05:13.235 86== by 0x392D0E: ExecNestLoop (nodeNestloop.c:109) ==00:00:05:13.235 86== { Memcheck:Param write(buf) fun:write fun:FileWrite fun:BufFileDumpBuffer fun:BufFileFlush fun:BufFileRead fun:ltsReadBlock fun:ltsReadFillBuffer fun:mergeruns fun:tuplesort_performsort fun:ExecSort fun:ExecProcNodeInstr fun:ExecProcNode fun:ExecMaterial fun:ExecProcNodeInstr fun:ExecProcNode fun:ExecMergeJoin } ==00:00:05:45.715 86== ==00:00:05:45.715 86== HEAP SUMMARY: ==00:00:05:45.715 86== in use at exit: 1,773,479 bytes in 323 blocks ==00:00:05:45.715 86== total heap usage: 1,313,446 allocs, 798 frees, 156,993,525 bytes allocated ==00:00:05:45.715 86== ==00:00:05:45.715 86== For a detailed leak analysis, rerun with: --leak-check=full ==00:00:05:45.715 86== ==00:00:05:45.715 86== For counts of detected and suppressed errors, rerun with: -v ==00:00:05:45.715 86== Use --track-origins=yes to see where uninitialised values come from ==00:00:05:45.715 86== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 16 from 6) --------------8AA61F4F3015A9596D99D3C4 Content-Type: text/x-log; name="postmaster-88.log" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="postmaster-88.log" ==00:00:05:03.891 88== Memcheck, a memory error detector ==00:00:05:03.891 88== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==00:00:05:03.891 88== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==00:00:05:03.891 88== Command: /usr/local/pgsql/bin/../obin/postmaster -D /var/lib/postgresql/main -c config_file=/var/lib/postgresql/main/postgresql.conf ==00:00:05:03.891 88== Parent PID: 14 ==00:00:05:03.891 88== ==00:00:05:13.231 88== Syscall param write(buf) points to uninitialised byte(s) ==00:00:05:13.231 88== at 0x4E4D281: write (write.c:27) ==00:00:05:13.231 88== by 0x487ACF: FileWrite (fd.c:1773) ==00:00:05:13.231 88== by 0x489CB1: BufFileDumpBuffer (buffile.c:324) ==00:00:05:13.231 88== by 0x48A164: BufFileFlush (buffile.c:466) ==00:00:05:13.231 88== by 0x48A164: BufFileRead (buffile.c:372) ==00:00:05:13.231 88== by 0x5FAC68: ltsReadBlock (logtape.c:248) ==00:00:05:13.231 88== by 0x5FAD4C: ltsReadFillBuffer (logtape.c:275) ==00:00:05:13.231 88== by 0x60337D: mergeruns (tuplesort.c:2683) ==00:00:05:13.231 88== by 0x60337D: tuplesort_performsort (tuplesort.c:1823) ==00:00:05:13.231 88== by 0x395B42: ExecSort (nodeSort.c:117) ==00:00:05:13.231 88== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.231 88== by 0x38D8D3: ExecProcNode (executor.h:250) ==00:00:05:13.231 88== by 0x38D8D3: ExecMaterial (nodeMaterial.c:134) ==00:00:05:13.231 88== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.231 88== by 0x38EC87: ExecProcNode (executor.h:250) ==00:00:05:13.231 88== by 0x38EC87: ExecMergeJoin (nodeMergejoin.c:704) ==00:00:05:13.231 88== Address 0x5fe1da8 is 2,840 bytes inside a block of size 8,256 client-defined ==00:00:05:13.231 88== at 0x5F5B50: palloc (mcxt.c:872) ==00:00:05:13.231 88== by 0x489EBF: makeBufFile (buffile.c:107) ==00:00:05:13.231 88== by 0x489EBF: BufFileCreateTemp (buffile.c:175) ==00:00:05:13.231 88== by 0x5FAE24: LogicalTapeSetCreate (logtape.c:390) ==00:00:05:13.231 88== by 0x6019AC: inittapes (tuplesort.c:2410) ==00:00:05:13.231 88== by 0x6019AC: puttuple_common (tuplesort.c:1622) ==00:00:05:13.231 88== by 0x602CA3: tuplesort_puttupleslot (tuplesort.c:1375) ==00:00:05:13.231 88== by 0x395B20: ExecSort (nodeSort.c:111) ==00:00:05:13.231 88== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.231 88== by 0x38D8D3: ExecProcNode (executor.h:250) ==00:00:05:13.231 88== by 0x38D8D3: ExecMaterial (nodeMaterial.c:134) ==00:00:05:13.231 88== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.231 88== by 0x38EC87: ExecProcNode (executor.h:250) ==00:00:05:13.231 88== by 0x38EC87: ExecMergeJoin (nodeMergejoin.c:704) ==00:00:05:13.231 88== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.231 88== by 0x392D0E: ExecProcNode (executor.h:250) ==00:00:05:13.231 88== by 0x392D0E: ExecNestLoop (nodeNestloop.c:109) ==00:00:05:13.231 88== { Memcheck:Param write(buf) fun:write fun:FileWrite fun:BufFileDumpBuffer fun:BufFileFlush fun:BufFileRead fun:ltsReadBlock fun:ltsReadFillBuffer fun:mergeruns fun:tuplesort_performsort fun:ExecSort fun:ExecProcNodeInstr fun:ExecProcNode fun:ExecMaterial fun:ExecProcNodeInstr fun:ExecProcNode fun:ExecMergeJoin } ==00:00:05:45.331 88== ==00:00:05:45.331 88== HEAP SUMMARY: ==00:00:05:45.331 88== in use at exit: 1,007,840 bytes in 209 blocks ==00:00:05:45.331 88== total heap usage: 668,190 allocs, 524 frees, 72,372,249 bytes allocated ==00:00:05:45.331 88== ==00:00:05:45.331 88== For a detailed leak analysis, rerun with: --leak-check=full ==00:00:05:45.331 88== ==00:00:05:45.331 88== For counts of detected and suppressed errors, rerun with: -v ==00:00:05:45.331 88== Use --track-origins=yes to see where uninitialised values come from ==00:00:05:45.331 88== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 11 from 6) --------------8AA61F4F3015A9596D99D3C4 Content-Type: text/x-log; name="postmaster-89.log" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="postmaster-89.log" ==00:00:05:03.907 89== Memcheck, a memory error detector ==00:00:05:03.907 89== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==00:00:05:03.907 89== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==00:00:05:03.907 89== Command: /usr/local/pgsql/bin/../obin/postmaster -D /var/lib/postgresql/main -c config_file=/var/lib/postgresql/main/postgresql.conf ==00:00:05:03.907 89== Parent PID: 14 ==00:00:05:03.907 89== ==00:00:05:13.502 89== Syscall param write(buf) points to uninitialised byte(s) ==00:00:05:13.502 89== at 0x4E4D281: write (write.c:27) ==00:00:05:13.502 89== by 0x487ACF: FileWrite (fd.c:1773) ==00:00:05:13.502 89== by 0x489CB1: BufFileDumpBuffer (buffile.c:324) ==00:00:05:13.502 89== by 0x48A164: BufFileFlush (buffile.c:466) ==00:00:05:13.502 89== by 0x48A164: BufFileRead (buffile.c:372) ==00:00:05:13.502 89== by 0x5FAC68: ltsReadBlock (logtape.c:248) ==00:00:05:13.502 89== by 0x5FAD4C: ltsReadFillBuffer (logtape.c:275) ==00:00:05:13.502 89== by 0x60337D: mergeruns (tuplesort.c:2683) ==00:00:05:13.502 89== by 0x60337D: tuplesort_performsort (tuplesort.c:1823) ==00:00:05:13.502 89== by 0x395B42: ExecSort (nodeSort.c:117) ==00:00:05:13.502 89== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.502 89== by 0x38D8D3: ExecProcNode (executor.h:250) ==00:00:05:13.502 89== by 0x38D8D3: ExecMaterial (nodeMaterial.c:134) ==00:00:05:13.502 89== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.502 89== by 0x38EC87: ExecProcNode (executor.h:250) ==00:00:05:13.502 89== by 0x38EC87: ExecMergeJoin (nodeMergejoin.c:704) ==00:00:05:13.502 89== Address 0x5fe1e08 is 2,840 bytes inside a block of size 8,256 client-defined ==00:00:05:13.502 89== at 0x5F5B50: palloc (mcxt.c:872) ==00:00:05:13.502 89== by 0x489EBF: makeBufFile (buffile.c:107) ==00:00:05:13.502 89== by 0x489EBF: BufFileCreateTemp (buffile.c:175) ==00:00:05:13.502 89== by 0x5FAE24: LogicalTapeSetCreate (logtape.c:390) ==00:00:05:13.502 89== by 0x6019AC: inittapes (tuplesort.c:2410) ==00:00:05:13.502 89== by 0x6019AC: puttuple_common (tuplesort.c:1622) ==00:00:05:13.502 89== by 0x602CA3: tuplesort_puttupleslot (tuplesort.c:1375) ==00:00:05:13.502 89== by 0x395B20: ExecSort (nodeSort.c:111) ==00:00:05:13.502 89== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.502 89== by 0x38D8D3: ExecProcNode (executor.h:250) ==00:00:05:13.502 89== by 0x38D8D3: ExecMaterial (nodeMaterial.c:134) ==00:00:05:13.502 89== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.502 89== by 0x38EC87: ExecProcNode (executor.h:250) ==00:00:05:13.502 89== by 0x38EC87: ExecMergeJoin (nodeMergejoin.c:704) ==00:00:05:13.502 89== by 0x375407: ExecProcNodeInstr (execProcnode.c:446) ==00:00:05:13.502 89== by 0x392D0E: ExecProcNode (executor.h:250) ==00:00:05:13.502 89== by 0x392D0E: ExecNestLoop (nodeNestloop.c:109) ==00:00:05:13.502 89== { Memcheck:Param write(buf) fun:write fun:FileWrite fun:BufFileDumpBuffer fun:BufFileFlush fun:BufFileRead fun:ltsReadBlock fun:ltsReadFillBuffer fun:mergeruns fun:tuplesort_performsort fun:ExecSort fun:ExecProcNodeInstr fun:ExecProcNode fun:ExecMaterial fun:ExecProcNodeInstr fun:ExecProcNode fun:ExecMergeJoin } ==00:00:05:45.308 89== ==00:00:05:45.308 89== HEAP SUMMARY: ==00:00:05:45.308 89== in use at exit: 1,008,240 bytes in 209 blocks ==00:00:05:45.308 89== total heap usage: 633,688 allocs, 520 frees, 69,381,867 bytes allocated ==00:00:05:45.308 89== ==00:00:05:45.308 89== For a detailed leak analysis, rerun with: --leak-check=full ==00:00:05:45.308 89== ==00:00:05:45.308 89== For counts of detected and suppressed errors, rerun with: -v ==00:00:05:45.308 89== Use --track-origins=yes to see where uninitialised values come from ==00:00:05:45.308 89== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 11 from 6) --------------8AA61F4F3015A9596D99D3C4--