[PATCH] Tiny optmization or is a bug?

Started by Ranier Vilelaabout 6 years ago2 messages
#1Ranier Vilela
ranier_gyn@hotmail.com
1 attachment(s)

Hi,
Maybe this is a real bug.

The assignment has no effect, or forget dereferencing it?

Best regards.
Ranier Vilela

--- \dll\postgresql-12.0\a\backend\commands\lockcmds.c	Mon Sep 30 17:06:55 2019
+++ lockcmds.c	Fri Nov 22 18:45:01 2019
@@ -285,7 +285,7 @@

LockViewRecurse_walker((Node *) viewquery, &context);

-	ancestor_views = list_delete_oid(ancestor_views, reloid);
+	list_delete_oid(ancestor_views, reloid);

table_close(view, NoLock);
}

Attachments:

lockcmds.c.patchapplication/octet-stream; name=lockcmds.c.patchDownload
--- \dll\postgresql-12.0\a\backend\commands\lockcmds.c	Mon Sep 30 17:06:55 2019
+++ lockcmds.c	Fri Nov 22 18:45:01 2019
@@ -285,7 +285,7 @@
 
 	LockViewRecurse_walker((Node *) viewquery, &context);
 
-	ancestor_views = list_delete_oid(ancestor_views, reloid);
+	list_delete_oid(ancestor_views, reloid);
 
 	table_close(view, NoLock);
 }
#2Tomas Vondra
tomas.vondra@2ndquadrant.com
In reply to: Ranier Vilela (#1)
Re: [PATCH] Tiny optmization or is a bug?

On Fri, Nov 22, 2019 at 09:51:50PM +0000, Ranier Vilela wrote:

Hi,
Maybe this is a real bug.

The assignment has no effect, or forget dereferencing it?

Best regards.
Ranier Vilela

--- \dll\postgresql-12.0\a\backend\commands\lockcmds.c	Mon Sep 30 17:06:55 2019
+++ lockcmds.c	Fri Nov 22 18:45:01 2019
@@ -285,7 +285,7 @@

LockViewRecurse_walker((Node *) viewquery, &context);

-	ancestor_views = list_delete_oid(ancestor_views, reloid);
+	list_delete_oid(ancestor_views, reloid);

table_close(view, NoLock);
}

This was already reworked in the master branch by commit d97b714a219.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services