pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Darafei Komяpa Praliaskouski <me@komzpa.net>
Cc: Pavel Borisov <pashkin.elfe@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Yet another fast GiST build
Date: Sun, 17 Jan 2021 15:50:31 -0500
Message-ID: <234863.1610916631@sss.pgh.pa.us> (raw)
In-Reply-To: <c0a679f3-fc3f-4ab0-bb18-b848cd6e9aa6@iki.fi>
References: <7d9158ca-d7cb-88f0-dbbd-1d5cec32b1ae@iki.fi>
	<85df399a-e8a4-2369-f723-fd1a3a872575@iki.fi>
	<!63596817-db40-1093-c6ce-5dea7dac67c4@iki.fi>
	<884200.1600634472@sss.pgh.pa.us>
	<891385.1600636205@sss.pgh.pa.us>
	<20200920224446.GF30557@telsasoft.com>
	<896113.1600643169@sss.pgh.pa.us>
	<8269ca22-d275-0afe-633c-2342c7ba11e6@iki.fi>
	<e1d41317-7420-b7ba-0d88-19625012e31e@iki.fi>
	<47CD54A6-EE59-433A-96E2-6F4E5973CEF4@yandex-team.ru>
	<422beff9-0e01-9ce6-edb9-c2a2289e8eb9@iki.fi>
	<0A1DDF47-CAB7-4D6A-9677-B1800FFB6984@yandex-team.ru>
	<4D68C21F-9FB9-41DA-B663-FDFC8D143788@yandex-team.ru>
	<4098005f-e4b5-5904-4b33-335dd106c132@iki.fi>
	<059BD785-A6CE-4E34-B80B-38E9E0309B78@yandex-team.ru>
	<CAH2-WzkBwtk0Np0oZvpiywqjrVwZQtDHSjatJ54ofyezLBxzeQ@mail.gmail.com>
	<8ACF61CC-32ED-4B4B-A2BC-15264E02D24E@yandex-team.ru>
	<3E4F9093-A1B5-4DF8-A292-0B48692E3954@yandex-team.ru>
	<ea7d112f-755e-d194-1777-f10ca6f372b7@iki.fi>
	<9FCEC1DC-86FB-4A57-88EF-DD13663B36AF@yandex-team.ru>
	<c0a679f3-fc3f-4ab0-! bb18-b848cd6e9aa6@iki.fi>

Heikki Linnakangas <hlinnaka@iki.fi> writes:
> On 12/01/2021 18:19, Andrey Borodin wrote:
>> Thanks! Looks good to me.

> Pushed, thanks!

I noticed that gist_page_items() thinks it can hold inter_call_data->rel
open across a series of calls.  That's completely unsafe: the executor
might not run the call series to completion (see LIMIT), resulting in
relcache leak complaints.  I suspect that it might have cache-flush
hazards even without that.  I think this code needs to be rewritten to do
all the interesting work in the first call.  Or maybe better, return the
results as a tuplestore so you don't have to do multiple calls at all.

			regards, tom lane





view thread (111+ messages)  latest in thread

Message-ID: <234863.1610916631@sss.pgh.pa.us>
Permalink:  ../234863.1610916631@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/234863.1610916631@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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hlinnaka@iki.fi, x4mmm@yandex-team.ru, pg@bowt.ie, pryzby@telsasoft.com, me@komzpa.net, pashkin.elfe@gmail.com, thomas.munro@gmail.com, michael@paquier.xyz, a.korotkov@postgrespro.ru
  Subject: Re: Yet another fast GiST build
  In-Reply-To: <234863.1610916631@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