In the example below I have a linestring PostGIS table (in black and yellow) and a single sided ST_Buffer output polygon (in red). The buffer distance is based on an attribute value stored in the linestring table.
As you can see one of the buffers is incorrect, and cuts a section of itself out for a certain amount of it. Why has this happened? Can it be fixed? Seems to be an issue where the linestring section becomes concave.
Try this for yourself using a similar query:
SELECT ST_BUFFER('LineString (638327 331059, 638337 331048, 638337 331037, 638343 331023, 638358 331014, 638380 330991, 638382 330978, 638391 330966, 638410 330959, 638420 330953)',50,'side=right')
In another example I'm seeing this happen (the black line is 1 feature, as is the buffer polygon):
And try this one with this:
SELECT ST_BUFFER('LineString (600296 172961, 600304 172962, 600307 172965, 600307 172969, 600307 172971, 600309 172974, 600308 172976, 600307 172979, 600306 172981, 600307 172982, 600311 172980, 600313 172979, 600317 172979, 600321 172982, 600325 172982, 600327 172979, 600328 172976, 600331 172974, 600338 172974)',10,'side=right')
Increase the buffer distances for stranger results. EPSG: 27700 in both cases.