Re: BUG #14344: string_agg(DISTINCT ..) crash

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Regina Obe <lr(at)pcorp(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14344: string_agg(DISTINCT ..) crash
Date: 2016-09-29 12:10:04
Message-ID: CAM3SWZRF5fuuBnk6jBtsjND6LY8g1xhX=3QKBwhq=bw7sG_BGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Sep 29, 2016 at 1:04 PM, David Rowley
<david(dot)rowley(at)2ndquadrant(dot)com> wrote:
> I didn't get a clean revert due to some conflicts. I manually ended up
> with the attached, which, when applied still crashes on windows.

Thanks.

I have been able to reproduce the problem, in a fashion, so can now
probably debug it easily enough. Specifically, I can get Valgrind to
complain about Regina's test case. Valgrind memcheck with
track_origins enabled, running Postgres git tip, prints the following:

2016-09-29 05:06:56.382 PDT 15292 LOG: tape 1 initially used 409 KB
of 1147 KB batch (0.357) and 17448 out of 37447 slots (0.466)
2016-09-29 05:06:56.383 PDT 15292 LOG: performsort done (except 2-way
final merge): CPU 0.02s/13.32u sec elapsed 13.35 sec
==15292== Invalid read of size 1
==15292== at 0x4A2F13: toast_raw_datum_size (tuptoaster.c:358)
==15292== by 0x7A41EF: texteq (varlena.c:1615)
==15292== by 0x7CA538: FunctionCall2Coll (fmgr.c:1319)
==15292== by 0x5BBC48: execTuplesMatch (execGrouping.c:100)
==15292== by 0x5CD7D5: process_ordered_aggregate_multi (nodeAgg.c:1244)
==15292== by 0x5CD7D5: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== by 0x6CCC43: exec_simple_query (postgres.c:1094)
==15292== by 0x6CCC43: PostgresMain (postgres.c:4070)
==15292== Address 0xc3e573b is 399,099 bytes inside a block of size
1,173,864 free'd
==15292== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E51C6: AllocSetFree (aset.c:989)
==15292== by 0x7E6C5D: pfree (mcxt.c:1012)
==15292== by 0x7ED2CC: mergebatchfreetape (tuplesort.c:3100)
==15292== by 0x7ED2CC: tuplesort_gettuple_common (tuplesort.c:2017)
==15292== by 0x7F11A0: tuplesort_gettupleslot (tuplesort.c:2066)
==15292== by 0x5CD876: process_ordered_aggregate_multi (nodeAgg.c:1231)
==15292== by 0x5CD876: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== Block was alloc'd at
==15292== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E4897: AllocSetAlloc (aset.c:691)
==15292== by 0x7E6F6D: MemoryContextAllocHuge (mcxt.c:1083)
==15292== by 0x7ECBF0: mergebatch (tuplesort.c:2983)
==15292== by 0x7ECBF0: beginmerge (tuplesort.c:2793)
==15292== by 0x7F10F0: mergeruns (tuplesort.c:2547)
==15292== by 0x7F10F0: tuplesort_performsort (tuplesort.c:1797)
==15292== by 0x5CD757: process_ordered_aggregate_multi (nodeAgg.c:1225)
==15292== by 0x5CD757: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292==
{
<insert_a_suppression_name_here>
Memcheck:Addr1
fun:toast_raw_datum_size
fun:texteq
fun:FunctionCall2Coll
fun:execTuplesMatch
fun:process_ordered_aggregate_multi
fun:finalize_aggregates
fun:agg_retrieve_direct
fun:ExecAgg
fun:ExecProcNode
fun:ExecutePlan
fun:standard_ExecutorRun
fun:ExecutorRun
fun:PortalRunSelect
fun:PortalRun
fun:exec_simple_query
fun:PostgresMain
}
==15292== Invalid read of size 1
==15292== at 0x7CC7AF: pg_detoast_datum_packed (fmgr.c:2214)
==15292== by 0x7A420C: texteq (varlena.c:1621)
==15292== by 0x7CA538: FunctionCall2Coll (fmgr.c:1319)
==15292== by 0x5BBC48: execTuplesMatch (execGrouping.c:100)
==15292== by 0x5CD7D5: process_ordered_aggregate_multi (nodeAgg.c:1244)
==15292== by 0x5CD7D5: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== by 0x6CCC43: exec_simple_query (postgres.c:1094)
==15292== by 0x6CCC43: PostgresMain (postgres.c:4070)
==15292== Address 0xc3e573b is 399,099 bytes inside a block of size
1,173,864 free'd
==15292== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E51C6: AllocSetFree (aset.c:989)
==15292== by 0x7E6C5D: pfree (mcxt.c:1012)
==15292== by 0x7ED2CC: mergebatchfreetape (tuplesort.c:3100)
==15292== by 0x7ED2CC: tuplesort_gettuple_common (tuplesort.c:2017)
==15292== by 0x7F11A0: tuplesort_gettupleslot (tuplesort.c:2066)
==15292== by 0x5CD876: process_ordered_aggregate_multi (nodeAgg.c:1231)
==15292== by 0x5CD876: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== Block was alloc'd at
==15292== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E4897: AllocSetAlloc (aset.c:691)
==15292== by 0x7E6F6D: MemoryContextAllocHuge (mcxt.c:1083)
==15292== by 0x7ECBF0: mergebatch (tuplesort.c:2983)
==15292== by 0x7ECBF0: beginmerge (tuplesort.c:2793)
==15292== by 0x7F10F0: mergeruns (tuplesort.c:2547)
==15292== by 0x7F10F0: tuplesort_performsort (tuplesort.c:1797)
==15292== by 0x5CD757: process_ordered_aggregate_multi (nodeAgg.c:1225)
==15292== by 0x5CD757: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292==
{
<insert_a_suppression_name_here>
Memcheck:Addr1
fun:pg_detoast_datum_packed
fun:texteq
fun:FunctionCall2Coll
fun:execTuplesMatch
fun:process_ordered_aggregate_multi
fun:finalize_aggregates
fun:agg_retrieve_direct
fun:ExecAgg
fun:ExecProcNode
fun:ExecutePlan
fun:standard_ExecutorRun
fun:ExecutorRun
fun:PortalRunSelect
fun:PortalRun
fun:exec_simple_query
fun:PostgresMain
}
==15292== Invalid read of size 1
==15292== at 0x7A4214: texteq (varlena.c:1623)
==15292== by 0x7CA538: FunctionCall2Coll (fmgr.c:1319)
==15292== by 0x5BBC48: execTuplesMatch (execGrouping.c:100)
==15292== by 0x5CD7D5: process_ordered_aggregate_multi (nodeAgg.c:1244)
==15292== by 0x5CD7D5: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== by 0x6CCC43: exec_simple_query (postgres.c:1094)
==15292== by 0x6CCC43: PostgresMain (postgres.c:4070)
==15292== by 0x670D36: BackendRun (postmaster.c:4260)
==15292== by 0x670D36: BackendStartup (postmaster.c:3934)
==15292== by 0x670D36: ServerLoop (postmaster.c:1691)
==15292== by 0x670D36: PostmasterMain (postmaster.c:1299)
==15292== Address 0xc3e573b is 399,099 bytes inside a block of size
1,173,864 free'd
==15292== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E51C6: AllocSetFree (aset.c:989)
==15292== by 0x7E6C5D: pfree (mcxt.c:1012)
==15292== by 0x7ED2CC: mergebatchfreetape (tuplesort.c:3100)
==15292== by 0x7ED2CC: tuplesort_gettuple_common (tuplesort.c:2017)
==15292== by 0x7F11A0: tuplesort_gettupleslot (tuplesort.c:2066)
==15292== by 0x5CD876: process_ordered_aggregate_multi (nodeAgg.c:1231)
==15292== by 0x5CD876: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== Block was alloc'd at
==15292== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E4897: AllocSetAlloc (aset.c:691)
==15292== by 0x7E6F6D: MemoryContextAllocHuge (mcxt.c:1083)
==15292== by 0x7ECBF0: mergebatch (tuplesort.c:2983)
==15292== by 0x7ECBF0: beginmerge (tuplesort.c:2793)
==15292== by 0x7F10F0: mergeruns (tuplesort.c:2547)
==15292== by 0x7F10F0: tuplesort_performsort (tuplesort.c:1797)
==15292== by 0x5CD757: process_ordered_aggregate_multi (nodeAgg.c:1225)
==15292== by 0x5CD757: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292==
{
<insert_a_suppression_name_here>
Memcheck:Addr1
fun:texteq
fun:FunctionCall2Coll
fun:execTuplesMatch
fun:process_ordered_aggregate_multi
fun:finalize_aggregates
fun:agg_retrieve_direct
fun:ExecAgg
fun:ExecProcNode
fun:ExecutePlan
fun:standard_ExecutorRun
fun:ExecutorRun
fun:PortalRunSelect
fun:PortalRun
fun:exec_simple_query
fun:PostgresMain
fun:BackendRun
fun:BackendStartup
fun:ServerLoop
fun:PostmasterMain
}
==15292== Invalid read of size 1
==15292== at 0x4C33D28: __memcmp_sse4_1 (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7A4241: texteq (varlena.c:1623)
==15292== by 0x7CA538: FunctionCall2Coll (fmgr.c:1319)
==15292== by 0x5BBC48: execTuplesMatch (execGrouping.c:100)
==15292== by 0x5CD7D5: process_ordered_aggregate_multi (nodeAgg.c:1244)
==15292== by 0x5CD7D5: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== by 0x6CCC43: exec_simple_query (postgres.c:1094)
==15292== by 0x6CCC43: PostgresMain (postgres.c:4070)
==15292== Address 0xc3e573c is 399,100 bytes inside a block of size
1,173,864 free'd
==15292== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E51C6: AllocSetFree (aset.c:989)
==15292== by 0x7E6C5D: pfree (mcxt.c:1012)
==15292== by 0x7ED2CC: mergebatchfreetape (tuplesort.c:3100)
==15292== by 0x7ED2CC: tuplesort_gettuple_common (tuplesort.c:2017)
==15292== by 0x7F11A0: tuplesort_gettupleslot (tuplesort.c:2066)
==15292== by 0x5CD876: process_ordered_aggregate_multi (nodeAgg.c:1231)
==15292== by 0x5CD876: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== Block was alloc'd at
==15292== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E4897: AllocSetAlloc (aset.c:691)
==15292== by 0x7E6F6D: MemoryContextAllocHuge (mcxt.c:1083)
==15292== by 0x7ECBF0: mergebatch (tuplesort.c:2983)
==15292== by 0x7ECBF0: beginmerge (tuplesort.c:2793)
==15292== by 0x7F10F0: mergeruns (tuplesort.c:2547)
==15292== by 0x7F10F0: tuplesort_performsort (tuplesort.c:1797)
==15292== by 0x5CD757: process_ordered_aggregate_multi (nodeAgg.c:1225)
==15292== by 0x5CD757: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292==
{
<insert_a_suppression_name_here>
Memcheck:Addr1
fun:__memcmp_sse4_1
fun:texteq
fun:FunctionCall2Coll
fun:execTuplesMatch
fun:process_ordered_aggregate_multi
fun:finalize_aggregates
fun:agg_retrieve_direct
fun:ExecAgg
fun:ExecProcNode
fun:ExecutePlan
fun:standard_ExecutorRun
fun:ExecutorRun
fun:PortalRunSelect
fun:PortalRun
fun:exec_simple_query
fun:PostgresMain
}
==15292== Invalid read of size 1
==15292== at 0x4C33D45: __memcmp_sse4_1 (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7A4241: texteq (varlena.c:1623)
==15292== by 0x7CA538: FunctionCall2Coll (fmgr.c:1319)
==15292== by 0x5BBC48: execTuplesMatch (execGrouping.c:100)
==15292== by 0x5CD7D5: process_ordered_aggregate_multi (nodeAgg.c:1244)
==15292== by 0x5CD7D5: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== by 0x6CCC43: exec_simple_query (postgres.c:1094)
==15292== by 0x6CCC43: PostgresMain (postgres.c:4070)
==15292== Address 0xc3e573a is 399,098 bytes inside a block of size
1,173,864 free'd
==15292== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E51C6: AllocSetFree (aset.c:989)
==15292== by 0x7E6C5D: pfree (mcxt.c:1012)
==15292== by 0x7ED2CC: mergebatchfreetape (tuplesort.c:3100)
==15292== by 0x7ED2CC: tuplesort_gettuple_common (tuplesort.c:2017)
==15292== by 0x7F11A0: tuplesort_gettupleslot (tuplesort.c:2066)
==15292== by 0x5CD876: process_ordered_aggregate_multi (nodeAgg.c:1231)
==15292== by 0x5CD876: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292== Block was alloc'd at
==15292== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15292== by 0x7E4897: AllocSetAlloc (aset.c:691)
==15292== by 0x7E6F6D: MemoryContextAllocHuge (mcxt.c:1083)
==15292== by 0x7ECBF0: mergebatch (tuplesort.c:2983)
==15292== by 0x7ECBF0: beginmerge (tuplesort.c:2793)
==15292== by 0x7F10F0: mergeruns (tuplesort.c:2547)
==15292== by 0x7F10F0: tuplesort_performsort (tuplesort.c:1797)
==15292== by 0x5CD757: process_ordered_aggregate_multi (nodeAgg.c:1225)
==15292== by 0x5CD757: finalize_aggregates (nodeAgg.c:1552)
==15292== by 0x5CE328: agg_retrieve_direct (nodeAgg.c:2157)
==15292== by 0x5CE328: ExecAgg (nodeAgg.c:1837)
==15292== by 0x5C135B: ExecProcNode (execProcnode.c:503)
==15292== by 0x5BD86C: ExecutePlan (execMain.c:1567)
==15292== by 0x5BD86C: standard_ExecutorRun (execMain.c:338)
==15292== by 0x5BD969: ExecutorRun (execMain.c:286)
==15292== by 0x6CE99E: PortalRunSelect (pquery.c:948)
==15292== by 0x6CFDC7: PortalRun (pquery.c:789)
==15292==
{
<insert_a_suppression_name_here>
Memcheck:Addr1
fun:__memcmp_sse4_1
fun:texteq
fun:FunctionCall2Coll
fun:execTuplesMatch
fun:process_ordered_aggregate_multi
fun:finalize_aggregates
fun:agg_retrieve_direct
fun:ExecAgg
fun:ExecProcNode
fun:ExecutePlan
fun:standard_ExecutorRun
fun:ExecutorRun
fun:PortalRunSelect
fun:PortalRun
fun:exec_simple_query
fun:PostgresMain
}
--15292-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0xf2
--15292-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0xf3
2016-09-29 05:06:58.308 PDT 15292 LOG: external sort ended, 177 disk
blocks used: CPU 0.02s/15.24u sec elapsed 15.27 sec

--
Peter Geoghegan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-09-29 12:59:00 Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails
Previous Message David Rowley 2016-09-29 12:04:54 Re: BUG #14344: string_agg(DISTINCT ..) crash