pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Yet another (minor) fix in BRIN
5+ messages / 4 participants
[nested] [flat]

Commits from this thread:
  2020-11-11 42c63ab6e2 c885e4a2f9 0d0626e27d c4424d33cc 1186a9d65d  Remove duplicate code in brin_memtuple_initialize
* Yet another (minor) fix in BRIN
@ 2020-11-08 01:23  Tomas Vondra <tomas.vondra@enterprisedb.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tomas Vondra @ 2020-11-08 01:23 UTC (permalink / raw)
  To: pgsql-hackers

Hi,

While rebasing some of the BRIN patches, I noticed some of the code in
brin_memtuple_initialize is duplicated. This happened in 8bf74967dab
which moved some of the code from brin_new_memtuple, not removing the
shared pieces. In practice this is benign, of course.

Barring objections I'll get the attached fix committed and backpatched.


regards

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

Attachments:

0001-Remove-duplicate-code-in-brin_memtuple_initialize.patch (text/x-patch, 1.2K) download From d97e3160921caa6d2191b7e8539d4d4f4816219c Mon Sep 17 00:00:00 2001 From: Tomas Vondra <tomas@2ndquadrant.com> Date: Sun, 8 Nov 2020 02:11:45 +0100 Subject: [PATCH] Remove duplicate code in brin_memtuple_initialize Commit 8bf74967dab moved some of the code from brin_new_memtuple to brin_memtuple_initialize, but this resulted in some of the code being duplicate. Fix by removing the duplicate lines and backpatch to 10. Author: Tomas Vondra Backpatch-through: 10 Discussion: TBD --- src/backend/access/brin/brin_tuple.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c index 6774f597a4..17e50de530 100644 --- a/src/backend/access/brin/brin_tuple.c +++ b/src/backend/access/brin/brin_tuple.c @@ -491,9 +491,6 @@ brin_memtuple_initialize(BrinMemTuple *dtuple, BrinDesc *brdesc) sizeof(BrinValues) * brdesc->bd_tupdesc->natts); for (i = 0; i < brdesc->bd_tupdesc->natts; i++) { - dtuple->bt_columns[i].bv_allnulls = true; - dtuple->bt_columns[i].bv_hasnulls = false; - dtuple->bt_columns[i].bv_attno = i + 1; dtuple->bt_columns[i].bv_allnulls = true; dtuple->bt_columns[i].bv_hasnulls = false; -- 2.26.2
^ permalink raw reply [nested|flat] 5+ messages in thread

* Re: Yet another (minor) fix in BRIN
@ 2020-11-08 01:51  Alvaro Herrera <alvherre@alvh.no-ip.org>
  parent: Tomas Vondra <tomas.vondra@enterprisedb.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Alvaro Herrera @ 2020-11-08 01:51 UTC (permalink / raw)
  To: Tomas Vondra <tomas.vondra@enterprisedb.com>; +Cc: pgsql-hackers

On 2020-Nov-08, Tomas Vondra wrote:

> While rebasing some of the BRIN patches, I noticed some of the code in
> brin_memtuple_initialize is duplicated. This happened in 8bf74967dab
> which moved some of the code from brin_new_memtuple, not removing the
> shared pieces. In practice this is benign, of course.
> 
> Barring objections I'll get the attached fix committed and backpatched.

LGTM, thanks for noticing.






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Yet another (minor) fix in BRIN
@ 2020-11-08 03:45  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2020-11-08 03:45 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>; pgsql-hackers

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2020-Nov-08, Tomas Vondra wrote:
>> While rebasing some of the BRIN patches, I noticed some of the code in
>> brin_memtuple_initialize is duplicated. This happened in 8bf74967dab
>> which moved some of the code from brin_new_memtuple, not removing the
>> shared pieces. In practice this is benign, of course.
>> 
>> Barring objections I'll get the attached fix committed and backpatched.

> LGTM, thanks for noticing.

The weekend before stable-branch releases is probably not the best
time to be pushing "minor" fixes into those branches.  I got my
fingers burned today, and so did Peter.  Don't follow our example ;-)

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Yet another (minor) fix in BRIN
@ 2020-11-08 11:34  Michael Paquier <michael@paquier.xyz>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Michael Paquier @ 2020-11-08 11:34 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; Tomas Vondra <tomas.vondra@enterprisedb.com>; pgsql-hackers

On Sat, Nov 07, 2020 at 10:45:26PM -0500, Tom Lane wrote:
> The weekend before stable-branch releases is probably not the best
> time to be pushing "minor" fixes into those branches.  I got my
> fingers burned today, and so did Peter.  Don't follow our example ;-)

You could just apply your stuff after the version is tagged (not
stamped as there could be urgent bug fixes between the stamp time and
the tag time, like packaing issues).
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Yet another (minor) fix in BRIN
@ 2020-11-08 15:47  Tomas Vondra <tomas.vondra@enterprisedb.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 5+ messages in thread

From: Tomas Vondra @ 2020-11-08 15:47 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-hackers

On 11/8/20 12:34 PM, Michael Paquier wrote:
> On Sat, Nov 07, 2020 at 10:45:26PM -0500, Tom Lane wrote:
>> The weekend before stable-branch releases is probably not the best
>> time to be pushing "minor" fixes into those branches.  I got my
>> fingers burned today, and so did Peter.  Don't follow our example ;-)
> 
> You could just apply your stuff after the version is tagged (not
> stamped as there could be urgent bug fixes between the stamp time and
> the tag time, like packaing issues).

Yeah, that's what I was planning to do - I was not suggesting I'll push
this right away. Or at least I did not mean to. Sorry if that was not
quite clear.


regards

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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2020-11-08 15:47 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 01:23 Yet another (minor) fix in BRIN Tomas Vondra <tomas.vondra@enterprisedb.com>
2020-11-08 01:51 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-11-08 03:45   ` Tom Lane <tgl@sss.pgh.pa.us>
2020-11-08 11:34     ` Michael Paquier <michael@paquier.xyz>
2020-11-08 15:47       ` Tomas Vondra <tomas.vondra@enterprisedb.com>

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