Re: dump/restore doesn't preserve row ordering?

From: Kevin Grittner <kgrittn(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dump/restore doesn't preserve row ordering?
Date: 2016-08-24 13:15:36
Message-ID: CACjxUsOXK+iNW5Rj44u64WoRoWWPArADvLRi4CxytTZaS+ed+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 23, 2016 at 8:43 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> It's interesting that nobody has complained about this behavior.

We have been known to emphasize that unless you have an ORDER BY
clause at the outermost level of a query, there is no guarantee
about the order of rows returned. In general, even with autovacuum
off and no DML running, the same query can return rows in a
different order because of synchronized scans -- so I would tend to
view the lack of complaints as a sign of the maturity and awareness
of the user base.

Of course, it can still be an inconvenience for testing, but that's
a different issue.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-08-24 13:42:56 Re: Showing parallel status in \df+
Previous Message Andrew Gierth 2016-08-24 12:55:00 Re: Strange result with LATERAL query