Search Postgresql Archives

Re: What could cause a temp table to disappear?

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

 




Le 2013-02-27 à 16:45, Adrian Klaver a écrit :

On 02/27/2013 01:19 PM, François Beausoleil wrote:


Any hints?

See in line notes below.
Also what client/library are you using to connect with?

I use Ruby & Sequel. Sequel is a very thin library over straight SQL.

NOTE: Log cut at 120 characters wide for easier viewing.

[INFO ] binding-data-persister:14072 - (0.006859s) CREATE TEMPORARY TABLE airings_import( LIKE airings INCLUDING ALL ) ON COMMIT DROP
[INFO ] binding-data-persister:14072 - (0.103249s) INSERT INTO "airings_import" ("airing_id", "channel_id", "show_id", "start_at", "end_at") VALUES ('61ec
...
[INFO ] binding-data-persister:14072 - (0.089145s) INSERT INTO "airings_import" ("airing_id", "channel_id", "show_id", "start_at", "end_at") VALUES ('03ea


So what is happening below and does that happen on dev?

[INFO ] binding-data-persister:14072 - (0.011618s) TRUNCATE TABLE "markets"
[INFO ] binding-data-persister:14072 - (0.006574s) INSERT INTO "markets" SELECT * FROM "markets_import" RETURNING "market_id"
[INFO ] binding-data-persister:14072 - (0.004189s) TRUNCATE TABLE "channels"
[INFO ] binding-data-persister:14072 - (0.008122s) INSERT INTO "channels" SELECT * FROM "channels_import" RETURNING "channel_id"
[INFO ] binding-data-persister:14072 - (0.003201s) TRUNCATE TABLE "channel_market_memberships"
[INFO ] binding-data-persister:14072 - (0.006054s) INSERT INTO "channel_market_memberships" SELECT * FROM "channel_market_memberships_import" RETURNING "m
[INFO ] binding-data-persister:14072 - (0.011205s) TRUNCATE TABLE "shows"
[INFO ] binding-data-persister:14072 - (0.063107s) INSERT INTO "shows" SELECT * FROM "shows_import" RETURNING "show_id"
[INFO ] binding-data-persister:14072 - (0.008198s) TRUNCATE TABLE "episodes"
[INFO ] binding-data-persister:14072 - (0.738297s) INSERT INTO "episodes" SELECT * FROM "episodes_import" RETURNING "episode_id"
[INFO ] binding-data-persister:14072 - (0.004846s) TRUNCATE TABLE "producers"
[INFO ] binding-data-persister:14072 - (0.005278s) INSERT INTO "producers" SELECT * FROM "producers_import" RETURNING "producer_id"
[ERROR] binding-data-persister:14072 - PG::Error: ERROR:  relation "airings_import" does not exist
[INFO ] binding-data-persister:14072 - (1.583302s) ROLLBACK

This is the production log, and it's the exact same in dev. The data I'm putting in the tables is authoritative, except for airings, which may or may not already exist in the database. In dev, the INSERT INTO airings SELECT * FROM airings_import WHERE NOT EXISTS(...) statement runs to completion. That's why I'm puzzled.

Bye,
François

<<attachment: smime.p7s>>


[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