If you can't recreate the table, you can always add a unique index that enforces this requirement:
create unique index no_dups on mytable (id, session);
However, you're going to have problems with the existing duplicate data that's already in the table.
Alternative, if you can redefine the table, you might prefer to add
primary key (id, session)
to the table definition.