pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Petr Jelinek <petr.jelinek@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Subject: Re: Decoding speculative insert with toast leaks memory
Date: Wed, 16 Jun 2021 10:48:24 -0400
Message-ID: <648020.1623854904@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1KMUq+6N4h6nVp=rJOMO12cJ5twtga=MbH6xk29oP6E=A@mail.gmail.com>
References: <CAFiTN-uCAt19gxuabMuXZ=gw+vx4YAGVE5-5OS77kTLSeX_8XA@mail.gmail.com>
	<202106091529.d24gsfbiaeut@alvherre.pgsql>
	<CAFiTN-s3CBwexFVR9=hF4dypxK27YQCTYVfsDj8ZC5OF=ah8WA@mail.gmail.com>
	<CAA4eK1Jme+erhKVjgP9w7G=btD82chEQkNK32gmtdYXp6XDcBQ@mail.gmail.com>
	<CAFiTN-s9ZqMnZxT109TU2=iFJSa0xndhhycFQqOq80zjMVX+AQ@mail.gmail.com>
	<CAA4eK1+kNZne_WTMg6kAYBg6u-WUrgLnRu5F32dTZgrzZSTQXA@mail.gmail.com>
	<CAA4eK1K5Hxt59Ldh1QSz63H07HnQLZ-erkAnUoFxL0oTGRXU3g@mail.gmail.com>
	<CAFiTN-ufAprpCy+_-gxDY0jf8QS3=msRS4ZeTGPDr7FdiWf3qQ@mail.gmail.com>
	<CAFiTN-u=Thq2eN20ER670ci6RSwkGsm2kS2K_MY5uj1yZJ+4Ug@mail.gmail.com>
	<CAA4eK1KMUq+6N4h6nVp=rJOMO12cJ5twtga=MbH6xk29oP6E=A@mail.gmail.com>

Amit Kapila <amit.kapila16@gmail.com> writes:
> Pushed!

skink reports that this has valgrind issues:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2021-06-15%2020%3A49%3A26

2021-06-16 01:20:13.344 UTC [2198271][4/0:0] LOG:  received replication command: IDENTIFY_SYSTEM
2021-06-16 01:20:13.384 UTC [2198271][4/0:0] LOG:  received replication command: START_REPLICATION SLOT "sub2" LOGICAL 0/0 (proto_version '1', publication_names '"pub2"')
2021-06-16 01:20:13.454 UTC [2198271][4/0:0] LOG:  starting logical decoding for slot "sub2"
2021-06-16 01:20:13.454 UTC [2198271][4/0:0] DETAIL:  Streaming transactions committing after 0/157C828, reading WAL from 0/157C7F0.
2021-06-16 01:20:13.488 UTC [2198271][4/0:0] LOG:  logical decoding found consistent point at 0/157C7F0
2021-06-16 01:20:13.488 UTC [2198271][4/0:0] DETAIL:  There are no running transactions.
...
==2198271== VALGRINDERROR-BEGIN
==2198271== Conditional jump or move depends on uninitialised value(s)
==2198271==    at 0x80EF890: rel_sync_cache_relation_cb (pgoutput.c:833)
==2198271==    by 0x666AEB: LocalExecuteInvalidationMessage (inval.c:595)
==2198271==    by 0x53A423: ReceiveSharedInvalidMessages (sinval.c:90)
==2198271==    by 0x666026: AcceptInvalidationMessages (inval.c:683)
==2198271==    by 0x53FBDD: LockRelationOid (lmgr.c:136)
==2198271==    by 0x1D3943: relation_open (relation.c:56)
==2198271==    by 0x26F21F: table_open (table.c:43)
==2198271==    by 0x66D97F: ScanPgRelation (relcache.c:346)
==2198271==    by 0x674644: RelationBuildDesc (relcache.c:1059)
==2198271==    by 0x674BE8: RelationClearRelation (relcache.c:2568)
==2198271==    by 0x675064: RelationFlushRelation (relcache.c:2736)
==2198271==    by 0x6750A6: RelationCacheInvalidateEntry (relcache.c:2797)
==2198271==  Uninitialised value was created by a heap allocation
==2198271==    at 0x6AC308: MemoryContextAlloc (mcxt.c:826)
==2198271==    by 0x68A8D9: DynaHashAlloc (dynahash.c:283)
==2198271==    by 0x68A94B: element_alloc (dynahash.c:1675)
==2198271==    by 0x68AA58: get_hash_entry (dynahash.c:1284)
==2198271==    by 0x68B23E: hash_search_with_hash_value (dynahash.c:1057)
==2198271==    by 0x68B3D4: hash_search (dynahash.c:913)
==2198271==    by 0x80EE855: get_rel_sync_entry (pgoutput.c:681)
==2198271==    by 0x80EEDA5: pgoutput_truncate (pgoutput.c:530)
==2198271==    by 0x4E48A2: truncate_cb_wrapper (logical.c:797)
==2198271==    by 0x4EFDDB: ReorderBufferCommit (reorderbuffer.c:1777)
==2198271==    by 0x4E1DBE: DecodeCommit (decode.c:637)
==2198271==    by 0x4E1F31: DecodeXactOp (decode.c:245)
==2198271== 
==2198271== VALGRINDERROR-END

			regards, tom lane





view thread (66+ messages)  latest in thread

Message-ID: <648020.1623854904@sss.pgh.pa.us>
Permalink:  ../648020.1623854904@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/648020.1623854904@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, dilipbalaut@gmail.com, alvherre@alvh.no-ip.org, andres@anarazel.de, ashutosh.bapat.oss@gmail.com, peter.eisentraut@2ndquadrant.com, petr.jelinek@enterprisedb.com, tomas.vondra@enterprisedb.com
  Subject: Re: Decoding speculative insert with toast leaks memory
  In-Reply-To: <648020.1623854904@sss.pgh.pa.us>
  References: <CAFiTN-uCAt19gxuabMuXZ=gw+vx4YAGVE5-5OS77kTLSeX_8XA@mail.gmail.com> <202106091529.d24gsfbiaeut@alvherre.pgsql> <CAFiTN-s3CBwexFVR9=hF4dypxK27YQCTYVfsDj8ZC5OF=ah8WA@mail.gmail.com> <CAA4eK1Jme+erhKVjgP9w7G=btD82chEQkNK32gmtdYXp6XDcBQ@mail.gmail.com> <CAFiTN-s9ZqMnZxT109TU2=iFJSa0xndhhycFQqOq80zjMVX+AQ@mail.gmail.com> <CAA4eK1+kNZne_WTMg6kAYBg6u-WUrgLnRu5F32dTZgrzZSTQXA@mail.gmail.com> <CAA4eK1K5Hxt59Ldh1QSz63H07HnQLZ-erkAnUoFxL0oTGRXU3g@mail.gmail.com> <CAFiTN-ufAprpCy+_-gxDY0jf8QS3=msRS4ZeTGPDr7FdiWf3qQ@mail.gmail.com> <CAFiTN-u=Thq2eN20ER670ci6RSwkGsm2kS2K_MY5uj1yZJ+4Ug@mail.gmail.com> <CAA4eK1KMUq+6N4h6nVp=rJOMO12cJ5twtga=MbH6xk29oP6E=A@mail.gmail.com> <648020.1623854904@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox