You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Increase width of RelFileNumbers from 32 bits to 56 bits.
RelFileNumbers are now assigned using a separate counter, instead ofbeing assigned from the OID counter. This counter never wraps around:if all 2^56 possible RelFileNumbers are used, an internal erroroccurs. As the cluster is limited to 2^64 total bytes of WAL, thislimitation should not cause a problem in practice.If the counter were 64 bits wide rather than 56 bits wide, we wouldneed to increase the width of the BufferTag, which might adverselyimpact buffer lookup performance. Also, this lets us use bigint forpg_class.relfilenode and other places where these values are exposedat the SQL level without worrying about overflow.This should remove the need to keep "tombstone" files around untilthe next checkpoint when relations are removed. We do that to keepRelFileNumbers from being recycled, but now that won't happenanyway. However, this patch doesn't actually change anything inthis area; it just makes it possible for a future patch to do so.Dilip Kumar, based on an idea from Andres Freund, who also reviewedsome earlier versions of the patch. Further review and somewordsmithing by me. Also reviewed at various points by AshutoshSharma, Vignesh C, Amul Sul, Álvaro Herrera, and Tom Lane.Discussion:http://postgr.es/m/CA+Tgmobp7+7kmi4gkq7Y+4AM9fTvL+O1oQ4-5gFTT+6Ng-dQ=g@mail.gmail.com