Pennsylvania voters retired two Democratic House members in Tuesday's primary, while picking the expected Democratic nominees for uphill races for governor and senator.

Meanwhile, Oregonians set the stage for what is expected to be a sharp general election battle by giving big primary election victories to Gov. Victor Atiyeh and his Democratic challenger, state Sen. Ted Kulongoski.

In the intraparty Democratic battles caused by Pennsylvania's loss of two House seats, Rep. Thomas M. Foglietta defeated Rep. Joseph F. Smith and Rep. John P. Murtha defeated Rep. Don Bailey.

As expected, the Pennsylvania Democrats gave Rep. Allen E. Ertel the difficult assignment of running against Gov. Richard L. Thornburgh and picked Allegheny County Commissioner Cyril H. Wecht for the even more intimidating task of opposing Republican Sen. John Heinz.

Atiyeh, who is completing his first term, won more than 82 percent of the Oregon Republican primary vote against five little-known opponents. But Kulongoski was at least as impressive in getting almost 60 percent of the Democratic vote in an eight-man field that included established Democratic figures from both Portland and Eugene.

Kulongoski, who ran a strong but losing race for the Senate in 1980, focused his campaign on Republican economic policies, which he blamed for the state's economic problems, which include an unemployment rate 2 points over the national average.

But Atiyeh immediately signaled that he would not let himself be put on the defensive by attacking Kulongoski's sponsorship of a plant-closing-notification bill, which the governor said would discourage new industries from coming into the state.

The four incumbent congressmen were renominated in Oregon. In the open 2nd Congressional District, the product of a reapportionment gain of one seat, state Sen. Bob Smith won the Republican nomination over County Commissioner Mike Fitzgerald, who campaigned as an all-out supporter of President Reagan.

Democratic National Committeewoman Larryann Willis defeated Medford Mayor Al Densmore to win the Democratic nomination.

In Pennsylvania, the survivors of the incumbent-versus-incumbent redistricting fights were the ones who did the better job of turning out their natural constituencies.

Foglietta's narrow, 1,500-vote victory in a Philadelphia rowhouse district was built on big margins in the black and Italian-American communities. Murtha's 8,500-vote win in western Pennsylvania was due to a heavy turnout in his home area around Johnstown.

Both districts are heavily Democratic, and the two winners are not expected to face difficult races in the fall.

The Philadelphia contest was seen by local politicians as putting a dent in the comeback ambitions of former mayor Frank L. Rizzo.

The flamboyant ex-police chief-turned-mayor came out of political retirement this spring to campaign for Smith and another longtime political ally who ran for a state senate seat.

Both of Rizzo's candidates lost, largely because black political leaders in both districts put together anti-Rizzo campaigns that yielded margins in the black wards ranging up to 6 to 1.

With characteristic bravado, Rizzo said on election night that, had he been on the ballot, he would have "creamed" either opponent. However, most city politicians say they believe the defeat of Rizzo's surrogates will make it more difficult for him to mount a challenge to Mayor William Green, who is expected to seek reelection next year. Green had quietly backed Foglietta.

The Murtha-Bailey race broke down strictly along geographic lines, with each candidate drawing margins of nearly 4 to 1 from the portion of the joined district he currently represents.

However, Murtha's home county, Cambria, turned out 55 percent of its Democratic voters, while Bailey's home base, Westmoreland County, turned out just 30 percent.