pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: tcassidy@mossridge.com.au
Subject: BUG #15602: pg_dump archive items not in correct section order
Date: Tue, 22 Jan 2019 06:06:20 +0000
Message-ID: <15602-e895445f73dc450b@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15602
Logged by:          Tom Cassidy
Email address:      tcassidy@mossridge.com.au
PostgreSQL version: 11.1
Operating system:   Devuan 2.0 ASCII
Description:        

Operating System: Devuan 2.0 ASCII (derivative of Debian 9/stretch)
Hardware: KVM Virtual Machine
PostgreSQL version: PostgreSQL 11.1 (Debian 11.1-1.pgdg90+1) on
x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0
20170516, 64-bit
pg_dump version: pg_dump (PostgreSQL) 11.1 (Debian 11.1-1.pgdg90+1)
Kernel: Linux 4.9.0-8-amd64
System Memory: 1GB
C library: libc6 (2.24-11+deb9u3)
Installation: following the quickstart instrunctions on
https://wiki.postgresql.org/wiki/Apt, installing the postgresql-11 package
from apt.postgresql.org for Debian 9/stretch


When I run pg_dump on a database, it reports the following warning:

pg_dump: [archiver] WARNING: archive items not in correct section order


The following SQL script replicates the warning when run on a new instance
of PostgreSQL 11.1:

postgres@devuan:/tmp$ cat test_case.sql 
CREATE DATABASE test_mv TEMPLATE template0;

\c test_mv

CREATE TABLE table1
(
    id bigint NOT NULL,
    name text NOT NULL,
    CONSTRAINT table1_pkey PRIMARY KEY (id)
);

CREATE TABLE table2
(
    id bigint NOT NULL,
    CONSTRAINT table2_pkey PRIMARY KEY (id)
);

CREATE MATERIALIZED VIEW mv_2
AS
 SELECT table1.name,
    table1.id
   FROM table1
  GROUP BY table1.id;

CREATE MATERIALIZED VIEW mv_1
AS
 SELECT z.name,
    a.id AS a_id,
    z.id AS z_id
   FROM table1 a
     JOIN ( SELECT mv_2.name,
            mv_2.id
           FROM mv_2) z ON z.id = a.id;
postgres@devuan:/tmp$


I have tested this on a new installation of PostgreSQL 11.1 using the
following commands:

postgres@devuan:/tmp$ psql -f test_case.sql
postgres@devuan:/tmp$ pg_dump test_mv > test_mv.sql
pg_dump: [archiver] WARNING: archive items not in correct section order
postgres@devuan:/tmp$


Verbose pg_dump:

postgres@devuan:/tmp$ pg_dump --verbose test_mv > test_mv.sql
pg_dump: last built-in OID is 16383
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined access methods
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined operator families
pg_dump: reading user-defined text search parsers
pg_dump: reading user-defined text search templates
pg_dump: reading user-defined text search dictionaries
pg_dump: reading user-defined text search configurations
pg_dump: reading user-defined foreign-data wrappers
pg_dump: reading user-defined foreign servers
pg_dump: reading default privileges
pg_dump: reading user-defined collations
pg_dump: reading user-defined conversions
pg_dump: reading type casts
pg_dump: reading transforms
pg_dump: reading table inheritance information
pg_dump: reading event triggers
pg_dump: finding extension tables
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: finding the columns and types of table "public.table1"
pg_dump: finding the columns and types of table "public.table2"
pg_dump: finding the columns and types of table "public.mv_2"
pg_dump: finding the columns and types of table "public.mv_1"
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading indexes for table "public.table1"
pg_dump: reading indexes for table "public.table2"
pg_dump: flagging indexes in partitioned tables
pg_dump: reading extended statistics
pg_dump: reading constraints
pg_dump: reading triggers
pg_dump: reading rewrite rules
pg_dump: reading policies
pg_dump: reading row security enabled for table "public.table1"
pg_dump: reading policies for table "public.table1"
pg_dump: reading row security enabled for table "public.table2"
pg_dump: reading policies for table "public.table2"
pg_dump: reading row security enabled for table "public.mv_2"
pg_dump: reading policies for table "public.mv_2"
pg_dump: reading row security enabled for table "public.mv_1"
pg_dump: reading policies for table "public.mv_1"
pg_dump: reading publications
pg_dump: reading publication membership
pg_dump: reading publication membership for table "public.table1"
pg_dump: reading publication membership for table "public.table2"
pg_dump: reading subscriptions
pg_dump: reading large objects
pg_dump: reading dependency data
pg_dump: saving encoding = UTF8
pg_dump: saving standard_conforming_strings = on
pg_dump: saving search_path = 
pg_dump: [archiver] WARNING: archive items not in correct section order
pg_dump: creating TABLE "public.table1"
pg_dump: creating TABLE "public.table2"
pg_dump: processing data for table "public.table1"
pg_dump: dumping contents of table "public.table1"
pg_dump: processing data for table "public.table2"
pg_dump: dumping contents of table "public.table2"
pg_dump: creating CONSTRAINT "public.table1 table1_pkey"
pg_dump: creating MATERIALIZED VIEW "public.mv_2"
pg_dump: creating MATERIALIZED VIEW "public.mv_1"
pg_dump: creating CONSTRAINT "public.table2 table2_pkey"
pg_dump: creating MATERIALIZED VIEW DATA "public.mv_2"
pg_dump: creating MATERIALIZED VIEW DATA "public.mv_1"
postgres@devuan:/tmp$



view thread (5+ messages)  latest in thread

Message-ID: <15602-e895445f73dc450b@postgresql.org>
Permalink:  ../15602-e895445f73dc450b@postgresql.org/
Also on:    postgresql.org/message-id/15602-e895445f73dc450b@postgresql.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, tcassidy@mossridge.com.au
  Subject: Re: BUG #15602: pg_dump archive items not in correct section order
  In-Reply-To: <15602-e895445f73dc450b@postgresql.org>

* 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