Re: Problem with bacula and 8.3/8.4

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Arturo Pérez <arturo(at)ethicist(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with bacula and 8.3/8.4
Date: 2009-08-20 02:33:10
Message-ID: 1250735590.26949.10.camel@ayaki
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2009-08-19 at 08:58 -0400, Arturo Pérez wrote:

> 19-Aug 02:24 bacula-dir JobId 1951: Fatal error: sql_create.c:789
> Fill Path table Query failed: INSERT INTO Path (Path) SELECT a.Path
> FROM (SELECT DISTINCT Path FROM batch) AS a WHERE NOT EXISTS (SELECT
> Path FROM Path WHERE Path = a.Path) : ERR=ERROR: array size exceeds
> the maximum allowed (268435455)

That's odd. Where's the array? Subqueries shouldn't result in arrays in
any way, no?

On my Bacula install there are no triggers on the `path' table and it's
a very simple table:

Table "public.path"
Column | Type | Modifiers
--------+---------+-------------------------------------------------------
pathid | integer | not null default nextval('path_pathid_seq'::regclass)
path | text | not null
Indexes:
"path_pkey" PRIMARY KEY, btree (pathid)
"path_name_idx" btree (path)

so I'm a bit puzzled. Just to see, try expressing the query in two steps:

SELECT path INTO TEMPORARY TABLE batch_path
FROM batch GROUP BY path;

INSERT INTO Path (Path)
SELECT batch_path.Path
FROM batch_path AS a
WHERE NOT EXISTS (SELECT 1 FROM Path WHERE Path = a.Path);

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gerhard Heift 2009-08-20 06:58:19 unique index for periods
Previous Message Randal L. Schwartz 2009-08-20 00:32:07 Re: Postgre RAISE NOTICE and PHP