pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Костя Кузнецов <chapaev28@ya.ru>
Subject: Re: GiST VACUUM
Date: Fri, 22 Mar 2019 12:28:53 +0200
Message-ID: <8663c730-0895-cf80-acc2-e7149f6455e6@iki.fi> (raw)
In-Reply-To: <5742CFFD-3A65-4980-9091-D74BE7C6D9E3@yandex-team.ru>
References: <479336FE-B713-4DFB-9661-9BFCCA70F4EF@yandex-team.ru>
	<4A1FF988-A69D-4607-8A6E-B3EC0FD6C2CF@yandex-team.ru>
	<43f15ab5-dd95-97d4-658b-e9954ca986a6@iki.fi>
	<DABC2BB9-154A-47E2-B1D9-B58A4023E6D7@yandex-team.ru>
	<E8FDC7F0-0516-4A84-B754-4CC92801E5F5@yandex-team.ru>
	<20181002011404.GU11712@paquier.xyz>
	<C1D00194-9A4D-4DE1-AAFE-6DA478A15207@yandex-team.ru>
	<d7e89e1b-efd4-1464-f03d-4ba4ea9e1835@iki.fi>
	<EB87A69B-EE5E-4259-9EEB-DA9DC1F7E265@yandex-team.ru>
	<96ec7ebd-42b9-4df5-18a4-42181c8a5a41@iki.fi>
	<1972C522-9019-4B9D-A6DF-3A5786688DB8@yandex-team.ru>
	<f8151e66-61ae-4065-fc67-d3fec59f5d5b@iki.fi>
	<FD68CBB1-716F-4344-9E3F-C27C14B8678B@yandex-team.ru>
	<7e3f29b6-de18-6bd5-ab06-db2eaa180173@iki.fi>
	<B1E4DF12-6CD3-4706-BDBD-BF3283328F60@yandex-team.ru>
	<68ea7682-65e5-0dd4-84c9-104e98c2151a@iki.fi>
	<36666F0F-F00A-4B44-97F9-F65223CA19CA@yandex-team.ru>
	<738ecf7d-abc1-ed64-6af7-09eb6d9f3d2f@iki.fi>
	<5742CFFD-3A65-4980-9091-D74BE7C6D9E3@yandex-team.ru>

On 22/03/2019 10:00, Andrey Borodin wrote:
>> 22 марта 2019 г., в 1:04, Heikki Linnakangas <hlinnaka@iki.fi>
>> написал(а):
>>
>> PS. for Gist, we could almost use the LSN / NSN mechanism to detect
>> the case that a deleted page is reused: Add a new field to the GiST
>> page header, to store a new "deleteNSN" field. When a page is
>> deleted, the deleted page's deleteNSN is set to the LSN of the
>> deletion record. When the page is reused, the deleteNSN field is
>> kept unchanged. When you follow a downlink during search, if you
>> see that the page's deleteNSN > parent's LSN, you know that it was
>> concurrently deleted and recycled, and should be ignored. That
>> would allow reusing deleted pages immediately. Unfortunately that
>> would require adding a new field to the gist page header/footer,
>> which requires upgrade work :-(. Maybe one day, we'll bite the
>> bullet. Something to keep in mind, if we have to change the page
>> format anyway, for some reason.
>
> Yeah, the same day we will get rid of invalid tuples. I can make a
> patch for v13. Actually, I have a lot of patches that I want in GiST
> in v13. Or v14.

Cool! Here's my wishlist:

* That deleteNSN thing
* Add a metapage to blk #0.
* Add a "level"-field to page header.
* Currently, a search needs to scan all items on a page. If the keys are 
small, that can be pretty slow. Divide each page further into e.g. 4 
sub-pages, with a "bounding box" key for each sub-page, to speed up search.

- Heikki




view thread (82+ messages)  latest in thread

Message-ID: <8663c730-0895-cf80-acc2-e7149f6455e6@iki.fi>
Permalink:  ../8663c730-0895-cf80-acc2-e7149f6455e6@iki.fi/
Also on:    postgresql.org/message-id/8663c730-0895-cf80-acc2-e7149f6455e6@iki.fi

 · 

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: hlinnaka@iki.fi, x4mmm@yandex-team.ru, michael@paquier.xyz, thomas.munro@enterprisedb.com, robertmhaas@gmail.com, chapaev28@ya.ru
  Subject: Re: GiST VACUUM
  In-Reply-To: <8663c730-0895-cf80-acc2-e7149f6455e6@iki.fi>

* 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