pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: osumi.takamichi@fujitsu.com, 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>
Subject: Re: Decoding speculative insert with toast leaks memory
Date: Wed, 23 Jun 2021 16:43:44 +0200
Message-ID: <7dab0929-a966-0c0a-4726-878fced2fe00@enterprisedb.com> (raw)
In-Reply-To: <CAA4eK1+fQXxgBWmGUkjYJ0wu2be44A9EnrRkvuYhTk4d7Cv-PA@mail.gmail.com>
References: <CAFiTN-uCAt19gxuabMuXZ=gw+vx4YAGVE5-5OS77kTLSeX_8XA@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>
	<CAA4eK1Lc7XdcKXPpO+YBv-qXSSk2obLbjM6z5F7YKSzYpqazsg@mail.gmail.com>
	<CA+HiwqEF1tLVtZWnuDCZ3Z3XUSe0qgG_=xnJFA-mJiCWeO1Bsg@mail.gmail.com>
	<CAA4eK1KeDtTkjHmqGYB0u6Ldc03-x-FOqcJO2TNFu4Onf2v3nw@mail.gmail.com>
	<CA+HiwqEgEAgAwhiT9dC-q8myQS-Xw11vxcQNXwP8+dngyihU3g@mail.gmail.com>
	<CAFiTN-t=pKW6eBPd7a566qc6MumE8PCY+1pGFOeVFSAhZZvxbw@mail.gmail.com>
	<CA+HiwqHeYxnx+_oZ9LtsUZUTDV0DjvBarA92DWZr9rrN=WAfhw@mail.gmail.com>
	<CAA4eK1JyA2TAPdC=9Z03E_9wjoww_=swBVtpF6_z2nKWY=avMg@mail.gmail.com>
	<CAA4eK1+fQXxgBWmGUkjYJ0wu2be44A9EnrRkvuYhTk4d7Cv-PA@mail.gmail.com>

Hi,

On 6/18/21 5:50 AM, Amit Kapila wrote:
> On Thu, Jun 17, 2021 at 2:55 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>>
>> Your patch looks good to me as well. I would like to retain the
>> comment as it is from master for now. I'll do some testing and push it
>> tomorrow unless there are additional comments.
>>
> 
> Pushed!
> 

While rebasing a patch broken by 4daa140a2f5, I noticed that the patch
does this:

@@ -63,6 +63,7 @@ enum ReorderBufferChangeType
        REORDER_BUFFER_CHANGE_INTERNAL_TUPLECID,
        REORDER_BUFFER_CHANGE_INTERNAL_SPEC_INSERT,
        REORDER_BUFFER_CHANGE_INTERNAL_SPEC_CONFIRM,
+       REORDER_BUFFER_CHANGE_INTERNAL_SPEC_ABORT,
        REORDER_BUFFER_CHANGE_TRUNCATE
 };


I understand adding the ABORT right after CONFIRM

Isn't that an undesirable ABI break for extensions? It changes the value
for the TRUNCATE item, so if an extension references to that somehow
it'd suddenly start failing (until it gets rebuilt). And the failures
would be pretty confusing and seemingly contradicting the code.

FWIW I don't know how likely it is for an extension to depend on the
TRUNCATE value (it'd be far worse for INSERT/UPDATE/DELETE), but seems
moving the new element at the end would solve this.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





view thread (66+ messages)  latest in thread

Message-ID: <7dab0929-a966-0c0a-4726-878fced2fe00@enterprisedb.com>
Permalink:  ../7dab0929-a966-0c0a-4726-878fced2fe00@enterprisedb.com/
Also on:    postgresql.org/message-id/7dab0929-a966-0c0a-4726-878fced2fe00@enterprisedb.com

 · 

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: tomas.vondra@enterprisedb.com, amit.kapila16@gmail.com, amitlangote09@gmail.com, dilipbalaut@gmail.com, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, andres@anarazel.de, ashutosh.bapat.oss@gmail.com, peter.eisentraut@2ndquadrant.com, petr.jelinek@enterprisedb.com
  Subject: Re: Decoding speculative insert with toast leaks memory
  In-Reply-To: <7dab0929-a966-0c0a-4726-878fced2fe00@enterprisedb.com>
  References: <CAFiTN-uCAt19gxuabMuXZ=gw+vx4YAGVE5-5OS77kTLSeX_8XA@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> <CAA4eK1Lc7XdcKXPpO+YBv-qXSSk2obLbjM6z5F7YKSzYpqazsg@mail.gmail.com> <CA+HiwqEF1tLVtZWnuDCZ3Z3XUSe0qgG_=xnJFA-mJiCWeO1Bsg@mail.gmail.com> <CAA4eK1KeDtTkjHmqGYB0u6Ldc03-x-FOqcJO2TNFu4Onf2v3nw@mail.gmail.com> <CA+HiwqEgEAgAwhiT9dC-q8myQS-Xw11vxcQNXwP8+dngyihU3g@mail.gmail.com> <CAFiTN-t=pKW6eBPd7a566qc6MumE8PCY+1pGFOeVFSAhZZvxbw@mail.gmail.com> <CA+HiwqHeYxnx+_oZ9LtsUZUTDV0DjvBarA92DWZr9rrN=WAfhw@mail.gmail.com> <CAA4eK1JyA2TAPdC=9Z03E_9wjoww_=swBVtpF6_z2nKWY=avMg@mail.gmail.com> <CAA4eK1+fQXxgBWmGUkjYJ0wu2be44A9EnrRkvuYhTk4d7Cv-PA@mail.gmail.com> <7dab0929-a966-0c0a-4726-878fced2fe00@enterprisedb.com>

* 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