[PATCH] Comments related to "Take fewer snapshots" and "Revert patch for taking fewer snapshots"

From: Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Comments related to "Take fewer snapshots" and "Revert patch for taking fewer snapshots"
Date: 2020-02-10 09:42:46
Message-ID: CANtu0ogp6cTvMJObXP8n=k+JtqxY1iT9UV5MbGCpjjPa5crCiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, hackers.

Yesterday I have noticed that in simple protocol mode snapshot is
taken twice - first time for parsing/analyze and later for execution.

I was thinking it is a great idea to reuse the same snapshot. After
some time (not short) I was able to find this thread from 2011 with
exactly same idea (of course after I already got few % of performance
in POC):

https://www.postgresql.org/message-id/flat/CA%2BTgmoYqKRj9BozjB-%2BtLQgVkSvzPFWBEzRF4PM2xjPOsmFRdw%40mail.gmail.com

And it was even merged: "Take fewer snapshots" (
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d573e239f03506920938bf0be56c868d9c3416da
)

But where is optimisation in the HEAD?

It absent because was reverted later in 2012 because of tricky reasons
( https://www.postgresql.org/message-id/flat/5075D8DF.6050500%40fuzzy.cz
) in commit "Revert patch for taking fewer snapshots." (
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=532994299e2ff208a58376134fab75f5ae471e41
)

I think it is good idea to add few comments to code related to the
topic in order to safe time for a next guy.

Comments-only patch attached.

Thanks,
Michail.

Attachment Content-Type Size
comments.patch text/plain 849 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-02-10 11:03:31 Re: ERROR: subtransaction logged without previous top-level txn record
Previous Message Dilip Kumar 2020-02-10 09:39:12 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions