Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload.
От | Rajesh Kumar Mallah |
---|---|
Тема | Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload. |
Дата | |
Msg-id | 40D06096.90200@trade-india.com обсуждение исходный текст |
Ответ на | Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload. (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload.
|
Список | pgsql-admin |
Dear Tom,
Sorry i could not replicate that issue . But
here is something which was the original problem
and is replicable.
Regds
Mallah.
rt2=# CREATE UNIQUE INDEX users_1 on users_sample(name);
ERROR: could not create unique index
DETAIL: Table contains duplicated values.
rt2=#
rt2=# SELECT name from users_sample group by name having count(*) > 1 limit 20;
+------+
| name |
+------+
+------+
(0 rows)
Time: 766.725 ms
rt2=# SELECT version();
rt2=# SELECT name from users_sample group by name having count(*) > 1 ;
+------+
| name |
+------+
+------+
(0 rows)
Time: 905.586 ms
rt2=# SELECT version();
+----------------------------------------------------------------------------------------------------------+
| version |
+----------------------------------------------------------------------------------------------------------+
| PostgreSQL 7.4.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-34) |
+----------------------------------------------------------------------------------------------------------+
(1 row)
Time: 338.191 ms
Tom Lane wrote:
Rajesh Kumar Mallah <mallah@trade-india.com> writes:rt2=# SELECT name from users group by name having count(*) > 1 limit 20; (4 rows) rt2=# SELECT name from users group by name having count(*) > 1 ; (0 rows)Weird. What PG version is this? What does EXPLAIN show for each of these queries (maybe EXPLAIN ANALYZE too)? Can you provide a self-contained test case? regards, tom lane
В списке pgsql-admin по дате отправления: