Search Postgresql Archives

pg_dump of partitioned table not working.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What am I missing?

(Specifying the whole file name because multiple versions are installed.)

$ /usr/lib/postgresql/12/bin/pg_dump --version
pg_dump (PostgreSQL) 12.5 (Ubuntu 12.5-1.pgdg18.04+1)

postgres=# \d+ measurement
                           Partitioned table "public.measurement"
  Column   |  Type   | Collation | Nullable | Default | Storage | Stats target | Description
-----------+---------+-----------+----------+---------+---------+--------------+-------------
 city_id   | integer |           | not null |         | plain   |              |  logdate   | date    |           | not null |         | plain   |              |  peaktemp  | integer |           |          |         | plain   |              |  unitsales | integer |           |          |         | plain   |              |
Partition key: RANGE (logdate)
Indexes:
    "measurement_pkey" PRIMARY KEY, btree (city_id, logdate)
Partitions: measurement_y2019h1 FOR VALUES FROM ('2019-01-01') TO ('2019-07-01'),             measurement_y2019h2 FOR VALUES FROM ('2019-07-01') TO ('2020-01-01'),             measurement_y2020h1 FOR VALUES FROM ('2020-01-01') TO ('2020-07-01'),             measurement_y2020h2 FOR VALUES FROM ('2020-07-01') TO ('2021-01-01')

postgres=# select * from measurement;
 city_id |  logdate   | peaktemp | unitsales
---------+------------+----------+-----------
       5 | 2019-05-03 |          |
       5 | 2020-11-22 |       77 |        45
       4 | 2020-11-22 |       77 |        45
(3 rows)

$ /usr/lib/postgresql/12/bin/pg_dump -p5433 -d postgres -t measurement --data-only
--
-- PostgreSQL database dump
--

-- Dumped from database version 12.5 (Ubuntu 12.5-1.pgdg18.04+1)
-- Dumped by pg_dump version 12.5 (Ubuntu 12.5-1.pgdg18.04+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- PostgreSQL database dump complete
--



--
Angular momentum makes the world go 'round.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux