Re: archive items not in correct section order

From: Tim Clarke <tim(dot)clarke(at)minerva-analytics(dot)info>
To: <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: archive items not in correct section order
Date: 2018-08-28 19:39:05
Message-ID: 87a088a1-667b-26cb-de58-ca89077d66c2@minerva-analytics.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 27/08/18 15:22, Tom Lane wrote:
>> That's not supposed to happen. Can you create a test case, by any chance?
>> Presumably, it's triggered by some database schema change you made since
>> the last successful dump.
>>
>> regards, tom lane
>>

It wasn't the cross-tab/pivot, it was this materialized view:

CREATE materialized VIEW r.b AS
  SELECT
    c.id,
    f.ytext,
    min(coalesce(
      (select
        case
          when wb.prop >= 0.333 then 4
          when wb.prop >= 0.25 then 3
          when wb.prop >= 0.15 then 2
          when wb.prop >= 0.1 then 1
          else 0
        end
      FROM r.wb
      where
        wb.cid = c.id and
        wb.fid = f.id), 0)) as score
  FROM
    rating.cy,
    c,
    f
  WHERE
    c.id = f.cid AND
    f.cid = cy.cid AND
    f.ye = cy.ye
  GROUP BY
    1, 2
  LIMIT 1;

I've trimmed it down to even just one row and it still causes the
warning "pg_dump: [archiver] WARNING: archive items not in correct
section order"

It yields this data:

 id        | ytext    | score
-----------+----------+-------
         5 | 1996     |     0

--

Tim Clarke

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jack Cushman 2018-08-28 20:21:24 Re: Duplicating data folder without tablespace, for read access
Previous Message Tim Clarke 2018-08-28 15:11:05 Re: archive items not in correct section order