I have studied Newtonian physics, and was having a introduction to relativistic physics. I read a similar question in 'A brief history of Time' which is now not letting me sleep.
That change (aswell as any change in relative position of a mass) generates a perturbation (called gravitational waves) that propagates at the exact same speed as light. This means that the Earth wouldn't feel the change until 8 minutes had passed.
As the Sun gets farther the attraction would get weaker (by the square-law relation). But the important thing is that the time offset between the actual event as seen by the Sun and the event as seen from Earth would increase as they get farther (by means of a linear relation).
In general moving something as massive as the Sun so far that a change in the gravitational attraction gets noticed and doing it so quickly as to manifest itself in the Sun-Earth time-delay of 8 minutes requires a crazy amount of energy. If you do it slower you might be unable to see the offset in time between what happened in the Sun and what was perceived on Earth.
This requisite of moving a huge mass at huge speeds is met in some naturally ocurring scenarios, like for example black hole binaries (black holes orbiting each other). Only a black hole has the power to accellerate another black hole to those crazy speeds. In fact they are the strongest emmiters of gravitational waves.
The answer to your question depends on whether the sun's motion has suddenly changed, or the sun is just continuing in inertial motion.
If the sun is moving inertially, then the gravitational force points toward the current linearly extrapolated position of the sun. See Will, Propagation Speed of Gravity and the Relativistic Time Delay, http://arxiv.org/abs/astro-ph/0301145 . The effective semi-Newtonian interaction is not just a time-delayed version of Newton’s law; it also includes velocity-dependent forces.
If something starts applying a force to the sun at a certain point in time, then there will be effects from this that will be detectable at the earth 8 minutes later. These effects are proportional to the third derivative of the sun's position.
The Earth is in the gravitational field of the Sun.
Earth orbits the Sun at an average distance of 149.60 million km (92.96 million mi), and one complete orbit takes 365.256 days (1 sidereal year), during which time Earth has traveled 940 million km (584 million mi). Earth's orbit has an eccentricity of 0.0167. Since the Sun constitutes 99.76% of the mass of the Sun–Earth system, the center of the orbit is extremely close to the center of the Sun.
Now I assume (you need to clarify) you are asking what would happen if the Sun suddenly (instantly) disappeared. As per SR, this is not possible, because nothing travels faster then light.
So your question can only be regarded as what would happen if the Sun's gravitational field's cause (stress-energy) would change. How fast would that change in the mass (stress-energy) of the Sun be felt on Earth?
The effects of gravity travel at the speed of light. This is about 8 minutes to Earth.
In classical theories of gravitation, the changes in a gravitational field propagate. A change in the distribution of energy and momentum of matter results in subsequent alteration, at a distance, of the gravitational field which it produces. In the relativistic sense, the "speed of gravity" refers to the speed of a gravitational wave, which, as predicted by general relativity and confirmed by observation of the GW170817 neutron star merger, is the same speed as the speed of light (c).
Now there are two effects:
- we interpret this change as a GW, that is, the Sun would collide for example with another star.
In this case, for 8 minutes, we would not notice anything.
After 8 minutes, the GW caused by this change in the gravitational zone's strength (stress-energy) of the Sun would reach us, and Earth would start to deviate from its current orbit.
This is because GWs travel at the speed of light.
- we look at the static gravitational field of the Sun and its change, if the Sun would move away (relative to Earth).
The consequence of this is that static fields (either electric or gravitational) always point directly to the actual position of the bodies that they are connected to, without any delay that is due to any "signal" traveling (or propagating) from the charge, over a distance to an observer. This remains true if the charged bodies and their observers are made to "move" (or not), by simply changing reference frames. This fact sometimes causes confusion about the "speed" of such static fields, which sometimes appear to change infinitely quickly when the changes in the field are mere artifacts of the motion of the observer, or of observation.
This change would be felt on Earth instantly. This is because the static gravitational field of the Sun together with its center, the Sun itself would move away (relative to Earth).