mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Fix GiST index deletion assert issue.
Avoid calling heap_index_delete_tuples() with an empty deltids array to avoid an assertion failure. This issue was arguably an oversight in commitb5f58cf2, though the failing assert itself was added by my recent commitd168b666. No backpatch, though, since the oversight is harmless in the back branches. Author: Peter Geoghegan <pg@bowt.ie> Reported-By: Jaime Casanova <jcasanov@systemguards.com.ec> Discussion: https://postgr.es/m/CAJKUy5jscES84n3puE=sYngyF+zpb4wv8UMtuLnLPv5z=6yyNw@mail.gmail.com
This commit is contained in:
@@ -301,6 +301,8 @@ index_compute_xid_horizon_for_tuples(Relation irel,
|
||||
Page ipage = BufferGetPage(ibuf);
|
||||
IndexTuple itup;
|
||||
|
||||
Assert(nitems > 0);
|
||||
|
||||
delstate.bottomup = false;
|
||||
delstate.bottomupfreespace = 0;
|
||||
delstate.ndeltids = 0;
|
||||
|
||||
Reference in New Issue
Block a user