Re: [HACKERS] COPY FREEZE and PD_ALL_VISIBLE

Pavan Deolasee <pavan.deolasee@gmail.com>

From: Pavan Deolasee <pavan.deolasee@gmail.com>
To: Darafei Komяpa Praliaskouski <me@komzpa.net>
Cc: Jeff Janes <jeff.janes@gmail.com>, Simon Riggs <simon@2ndquadrant.com>, Amit Kapila <amit.kapila16@gmail.com>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-21T06:07:56Z
Lists: pgsql-hackers
On Tue, Jan 15, 2019 at 8:48 PM Darafei "Komяpa" Praliaskouski <
me@komzpa.net> wrote:

> Hello,
>
> Today I bumped into need to limit first VACUUM time on data import.
> I'm using utility called osmium together with COPY FREEZE to import
> openstreetmap data into database.
>
> osmium export -c osmium.config -f pg belarus-latest.osm.pbf  -v --progress
> | psql -1 -c 'create table byosm(geom geometry, osm_type text, osm_id
> bigint, tags jsonb);copy byosm from stdin freeze;'
>
> However, first pass of VACUUM rewrites the whole table. Here is two logs
> of VACUUM VERBOSE in a row:
>
> https://gist.github.com/Komzpa/e765c1c5e04623d83a6263d4833cf3a5
>
> In Russian Postgres Telegram group I've been recommended this thread.
> Can the patch be revived? What is needed to get it up for 12?
>

I posted a new patch [1] for consideration to include in PG12. I started a
new thread because the patch is completely new and this thread was a bit
too old.

Thanks,
Pavan

[1]
https://www.postgresql.org/message-id/CABOikdN-ptGv0mZntrK2Q8OtfUuAjqaYMGmkdU1dCKFtUxVLrg%40mail.gmail.com

-- 
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Commits

  1. Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE