pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mikhail Gribkov <youzhick@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Greg Nancarrow <gregn4422@gmail.com>
Cc: Ivan Panchenko <wao@mail.ru>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Cc: Ibrar Ahmed <ibrar.ahmad@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Subject: Re: On login trigger: take three
Date: Mon, 5 Feb 2024 20:00:01 +0300
Message-ID: <96b7fa75-a63a-1af1-6c41-3d9baadec238@gmail.com> (raw)
In-Reply-To: <CAPpHfds=u2o0tsafSCHfZrL89325mg-sFROxM50aqjaEVR-A1g@mail.gmail.com>
References: <CAPpHfduF9LHW5PK4si=gpRUnWrwi0J_aNC6rh4BkSgqkz5MYZA@mail.gmail.com>
	<CAPpHfdudXAO7QMFcgHJ_wjUt_NqkpOGC+_OhdUJnBfWf+7w_Bg@mail.gmail.com>
	<CAPpHfdvrOcmCXCYtpDG36=idH8RdhUWukXbvt_4DOTMessJQeQ@mail.gmail.com>
	<ZSyLN2HTz_iLSKkH@paquier.xyz>
	<CAPpHfdsbD9sxJFwhSnbcgvii0=gT+7j3XPumNDHZW=mHmVoxOg@mail.gmail.com>
	<CAMEv5_s=s2ZATDf3Zo11naH+25OKuoLyOxtPO+bKPB=qdMd4HQ@mail.gmail.com>
	<CAPpHfdsnBxnh4OWOSe1MyhZN8wZ8Z3CWLPmyc_zg=_MtWmwrFA@mail.gmail.com>
	<CAMEv5_unWRSqnznbRrGaCd00ZYkX9DxYLh1RqX7C1uxumtOedA@mail.gmail.com>
	<2133270.1698592561@sss.pgh.pa.us>
	<CAPpHfds1WuQOiqafsFjH8o_D1jVKjgH2im+VJb-NXtARvxUBqw@mail.gmail.com>
	<44807d19-81a6-3884-3e0f-22dd99aac3ed@gmail.com>
	<B5CD06A6-98AA-4839-8FD1-2EE132CFA76F@yesql.se>
	<CAPpHfdve2Z7e+MsHNk=ddYk-AUwjs7=v9fyMdoRV=Ooysfqo5g@mail.gmail.com>
	<e2a0248e-5f32-af0c-9832-a90d303c2c61@gmail.com>
	<CAPpHfdtbzYnC-1On-XtdOPfYFnZoNS=YOFy4iMBzxMsmGo=n6A@mail.gmail.com>
	<CAPpHfds=u2o0tsafSCHfZrL89325mg-sFROxM50aqjaEVR-A1g@mail.gmail.com>

Hello Alexander,

05.02.2024 02:51, Alexander Korotkov wrote:

> Usage of heap_inplace_update() seems appropriate for me here.  It
> avoids trouble with both TOAST and row-level locks.  Alexander, could
> you please recheck this fixes the problem.

I've re-tested the last problematic scenario and can confirm that the fix
works for it (though it still doesn't prevent the autovacuum issue (with
4b885d01 reverted)), but using heap_inplace_update() was considered risky
in a recent discussion:
https://www.postgresql.org/message-id/1596629.1698435146%40sss.pgh.pa.us
So maybe it's worth to postpone such a fix till that discussion is
finished or to look for another approach...

Best regards,
Alexander





view thread (171+ messages)  latest in thread

Message-ID: <96b7fa75-a63a-1af1-6c41-3d9baadec238@gmail.com>
Permalink:  ../96b7fa75-a63a-1af1-6c41-3d9baadec238@gmail.com/
Also on:    postgresql.org/message-id/96b7fa75-a63a-1af1-6c41-3d9baadec238@gmail.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: exclusion@gmail.com, aekorotkov@gmail.com, daniel@yesql.se, tgl@sss.pgh.pa.us, youzhick@gmail.com, michael@paquier.xyz, robertmhaas@gmail.com, andres@anarazel.de, gregn4422@gmail.com, wao@mail.ru, teodor@sigaev.ru, ibrar.ahmad@gmail.com, vignesh21@gmail.com, pavel.stehule@gmail.com, amit.kapila16@gmail.com, sawada.mshk@gmail.com
  Subject: Re: On login trigger: take three
  In-Reply-To: <96b7fa75-a63a-1af1-6c41-3d9baadec238@gmail.com>
  References: <CAPpHfduF9LHW5PK4si=gpRUnWrwi0J_aNC6rh4BkSgqkz5MYZA@mail.gmail.com> <CAPpHfdvrOcmCXCYtpDG36=idH8RdhUWukXbvt_4DOTMessJQeQ@mail.gmail.com> <ZSyLN2HTz_iLSKkH@paquier.xyz> <CAPpHfdsbD9sxJFwhSnbcgvii0=gT+7j3XPumNDHZW=mHmVoxOg@mail.gmail.com> <CAMEv5_s=s2ZATDf3Zo11naH+25OKuoLyOxtPO+bKPB=qdMd4HQ@mail.gmail.com> <CAPpHfdsnBxnh4OWOSe1MyhZN8wZ8Z3CWLPmyc_zg=_MtWmwrFA@mail.gmail.com> <CAMEv5_unWRSqnznbRrGaCd00ZYkX9DxYLh1RqX7C1uxumtOedA@mail.gmail.com> <2133270.1698592561@sss.pgh.pa.us> <CAPpHfds1WuQOiqafsFjH8o_D1jVKjgH2im+VJb-NXtARvxUBqw@mail.gmail.com> <44807d19-81a6-3884-3e0f-22dd99aac3ed@gmail.com> <B5CD06A6-98AA-4839-8FD1-2EE132CFA76F@yesql.se> <CAPpHfdve2Z7e+MsHNk=ddYk-AUwjs7=v9fyMdoRV=Ooysfqo5g@mail.gmail.com> <e2a0248e-5f32-af0c-9832-a90d303c2c61@gmail.com> <CAPpHfdtbzYnC-1On-XtdOPfYFnZoNS=YOFy4iMBzxMsmGo=n6A@mail.gmail.com> <CAPpHfds=u2o0tsafSCHfZrL89325mg-sFROxM50aqjaEVR-A1g@mail.gmail.com> <96b7fa75-a63a-1af1-6c41-3d9baadec238@gmail.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