fixing buffer merging with postgres backend