Understanding Query Plan’s “width” The Douglas and Douglas PostgreSQL book includes the following EXPLAIN result:



The first step of the query, the Seq Scan, shows a width of 1917. However the last step of the query, the Sort, has a width of 1911.

Why/how could these values differ?
Every PostgreSQL row version (&ldquo;tuple&rdquo;) has a number of system columns and other data that are not displayed by SELECT * (see the documentation for details. Among them are


xmin and xmax
extra flags that contain the &ldquo;hint bits&rdquo; and the &ldquo;frozen&rdquo; flag.
ctid, the tuple's physical address.


These would account 23 bytes, not for four, so you'd have to look at tge source for more. The only of these items that occupies 6 bytes is ctid, so maybe that.