The relationship between Russia/Soviet Union and Poland changed several times. “Rivalry” would be a better word to describe it.
The fundamental reason for the rivalry is geography. After the demise of the Byzantine empire, the main connection with Europe for us was Poland. Further south, sit the Carpathian mountains that separate us from the rest of Slavs. Poles occupy the plains between us and Germany.
This central position gave Poland a unique role as the “main” Slav nation in Europe for many centuries. What is now Ukraine and Belarus, was long a part of the Polish-Lithuanian state, and later the Polish kingdom. Much of the German influence came to us through Poland, before the Russian empire began a wholesale import of German officers and engineers from the Baltics and Prussia in the XVIII century.
In other words, the role of the great Slav empire required of Russia to get rid of Poland. Poles, on their part, in the XVI and XVII got an appetite for the lucrative Russian fur exports. This resulted in several wars, and the funny situation when Poles for a short period of time became nominal Czars of Russia.
The rivalry twice culminated in a destruction of the Polish state, with Russia and the Soviet Union annexing the eastern part of their country. Many Poles were included in our ruling elites, but many more actively fought for independence. Uprisings in the XIX century, the revolutionary war of 1919–1920, Stalin’s ethnic cleansings during the Great Terror, and the Molov-Ribbentrop partition of Poland created a lot of bad blood.
Now, with the creation of independent Belarus and Ukraine as a buffer between us, much of this tension has faded. In the mind of many nationalistic Russians, the place of Poland as an “evil Slav” is taken over by Ukraine.
Poland, along with Austria and Hungary, is also considered the place in the Central Europe with the most powerful Russian agents of influence. In addition to that, many in the Polish elite share Putin’s views on the EU as a liberal bureaucratic project, and the Anglo-Saxon globalism as a threat to the national identity. If the current tensions between the illiberal Polish leadership and the EU continue to gain strength, we may expect an emerging accord between Russia and Poland, in line with the existing one between Hungary and Russia.