Process executing COPY opens and reads every table on the system

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

 



I have an instance of PG 7.4 where I would really like to execute some
schema changes, but every schema change is blocked waiting for a process
doing a COPY.  That query is:

COPY drill.trades (manager, sec_id, ticker, bridge_tkr, date, "type",
short, quantity, price, prin, net_money, factor) TO stdout;

So it's only involved with a single table in a single schema.
Unfortunately, what this process is doing is opening and reading every
table in the database:

# strace -e open,close -p 29859
Process 29859 attached - interrupt to quit
open("/var/lib/postgres/data/base/7932340/2442094542", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.1", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205386", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205433", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205441", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.10", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.16", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/2298808676/2298808939.10", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.15", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205446", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205454", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429226532", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2442094542", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.4", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.8", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205386", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205441", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205446", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205454", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429226532", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2442094542", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205386", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205433", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205441", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414559657", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2426495316", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205446", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205454", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429226532", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2414561511", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2442094542", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205386", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.7", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205441", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429205446", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.1", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.10", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.2", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023238811.18", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2429226532", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/2298808676/2361517065", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2442094542", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.9", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.10", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.1", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.10", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.3", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.2", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/358185104.5", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/2298808676/2361517065", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.6", O_RDWR) = 49
close(49)                               = 0
open("/var/lib/postgres/data/base/7932340/2023517557.7", O_RDWR) = 49
close(49)                               = 0
Process 29859 detached

Seems like a somewhat unusual behavior.  As you can see it's opening
some tables numerous times.  Is there some way to avoid this?

-jwb


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux