Re: delete and select with IN clause issues - Mailing list pgsql-sql

From Tom Lane
Subject Re: delete and select with IN clause issues
Date
Msg-id 27200.1162537088@sss.pgh.pa.us
Whole thread Raw
In response to Re: delete and select with IN clause issues  (Jeff Frost <jeff@frostconsultingllc.com>)
Responses Re: delete and select with IN clause issues
List pgsql-sql
Jeff Frost <jeff@frostconsultingllc.com> writes:
> BTW, just to make sure I get the right file to ship over if we have this 
> again, it would be: /var/lib/pgsql/data/base/9366228/16204210 yes?

Not necessarily --- the filename is initially the same as the index OID,
but it wouldn't be anymore after a REINDEX.  Instead use what you get from

select relfilenode from pg_class where relname = 'page_view_visit_idx';

and note you will need to recheck it after reindexing.

Also, it's a good idea to do CHECKPOINT right before copying the
physical file, to make sure you've got a consistent file image on-disk.
If you want to be 100% certain, shut down the postmaster while copying,
but unless the index file is pretty large I think that's not necessary.
        regards, tom lane


pgsql-sql by date:

Previous
From: Jesper Krogh
Date:
Subject: Re: The empty list?
Next
From: Tom Lane
Date:
Subject: Re: The empty list?