pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tim Clarke <tim.clarke@minerva-analytics.info>
To: pgsql-general@lists.postgresql.org
Subject: Re: archive items not in correct section order
Date: Tue, 28 Aug 2018 20:39:05 +0100
Message-ID: <87a088a1-667b-26cb-de58-ca89077d66c2@minerva-analytics.info> (raw)
In-Reply-To: <6a3a3c92-bd2e-df53-da3a-877cb41bc7e0@minerva-analytics.info>
References: <2efc7f44-2820-6b86-6a45-b46bd32cc44d@minerva-analytics.info>
	<450.1535379741@sss.pgh.pa.us>
	<6a3a3c92-bd2e-df53-da3a-877cb41bc7e0@minerva-analytics.info>

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

view thread (7+ messages)  latest in thread

Message-ID: <87a088a1-667b-26cb-de58-ca89077d66c2@minerva-analytics.info>
Permalink:  ../87a088a1-667b-26cb-de58-ca89077d66c2@minerva-analytics.info/
Also on:    postgresql.org/message-id/87a088a1-667b-26cb-de58-ca89077d66c2@minerva-analytics.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tim.clarke@minerva-analytics.info
  Subject: Re: archive items not in correct section order
  In-Reply-To: <87a088a1-667b-26cb-de58-ca89077d66c2@minerva-analytics.info>
  References: <2efc7f44-2820-6b86-6a45-b46bd32cc44d@minerva-analytics.info> <450.1535379741@sss.pgh.pa.us> <6a3a3c92-bd2e-df53-da3a-877cb41bc7e0@minerva-analytics.info> <87a088a1-667b-26cb-de58-ca89077d66c2@minerva-analytics.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox