agora inbox for pgsql-admin@postgresql.org  
help / color / mirror / Atom feed
From: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Incorrect syntax when restoring a single table
Date: Thu, 27 Jun 2024 18:01:22 +0300
Message-ID: <aad5f968-29c3-66fe-c13d-aa699b23d204@cloud.gatewaynet.com> (raw)
In-Reply-To: <CANzqJaC-zy=B6YPUJvPZa7+1bUp1BLyurpoB7dZiB6aLbpofFw@mail.gmail.com>
References: <CANzqJaC-zy=B6YPUJvPZa7+1bUp1BLyurpoB7dZiB6aLbpofFw@mail.gmail.com>


On 6/27/24 17:01, Ron Johnson wrote:
> PG 16.3
>
> Obviously I've overlooked something, but can't see what it is.
>
> DB name is "tap".
> pwd is the directory above where the directory-format backup is located.
>
> I'm trying to restore the single table tapschema.batch_rp4_y2022m08 to 
> the existing database named "tap".
>
> The (compressed) backup file is about a megabyte, so there's data in 
> it.  However, when I run the "pg_restore -t" command, it connects, but 
> doesn't restore anything.
>
> $ pg_restore -l -Fd -f tap.list tap
>
> $ grep " batch_rp4_y2022m08 " tap.list
> 2118; 1259 1814433 TABLE tapschema batch_rp4_y2022m08 fis_tap
> 128513; 0 0 TABLE ATTACH tapschema batch_rp4_y2022m08 fis_tap
> 847489; 0 1814433 TABLE DATA tapschema batch_rp4_y2022m08 fis_tap
>
> $ dir tap/847489*
> -rw-r--r-- 1 postgres postgres 1067185 2024-06-27 02:31:24 
> tap/847489.dat.gz
>
> $ pg_restore -v -a -t tapschema.batch_rp4_y2022m08 -Fd --dbname=tap tap
> pg_restore: connecting to database for restore
>
> $ psql tap -c "select count(*) from batch_rp4_y2022m08;"
>  count
> -------
>      0
> (1 row)


Is your search_path correct ?






view thread (5+ messages)  latest in thread

Message-ID: <aad5f968-29c3-66fe-c13d-aa699b23d204@cloud.gatewaynet.com>
Permalink:  ../aad5f968-29c3-66fe-c13d-aa699b23d204@cloud.gatewaynet.com/
Also on:    postgresql.org/message-id/aad5f968-29c3-66fe-c13d-aa699b23d204@cloud.gatewaynet.com

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-admin@postgresql.org
  Cc: a.mantzios@cloud.gatewaynet.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Incorrect syntax when restoring a single table
  In-Reply-To: <aad5f968-29c3-66fe-c13d-aa699b23d204@cloud.gatewaynet.com>

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

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