powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / PostgreSQL [игнор отключен] [закрыт для гостей] / Ошибка при запросе!
15 сообщений из 15, страница 1 из 1
Ошибка при запросе!
    #34560289
Kylt
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Есть база на постгресе 7.0.3 кажеться, в ней есть одна таблица размером почти 700М.
Так вот при попытке выборки из данной таблицы обычным селектом происходит такое:
Error: The backend has broken the connection. Possibly the action you have attempted has caused it to close.

Из других таблиц выбирается нормально. Возможно это изза размера таблицы (остальные существенно меньше)

Структуру таблицы узнать не удается - все нормальные визуальные редакторы (пгаадмин3, емс) к такому старому серваку не хотять конектиться, а те которые конектятся позволяют увидеть разве что список таблиц и сделать запрос
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560410
jaga
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
700М - это, наверное, не слишком большой размер.
Похоже все дело в клиенте.
Попробуй своего написать.
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560443
Kylt
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
to jaga: такую ошибку выдают разные клиенты.

Для своего клиента мне нужны или делфевые компоненты или одибисишный драйвер - ничего из этого не посоветуеш?
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560535
Andrey Daeron
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Kylt
Структуру таблицы узнать не удается - все нормальные визуальные редакторы (пгаадмин3, емс) к такому старому серваку не хотять конектиться, а те которые конектятся позволяют увидеть разве что список таблиц и сделать запрос
А psql коннектится? Выбирает? А что в логах сервака?

ЗЫ Может можно версию поднять? А то совсем древняя...
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560577
Thamerlan
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
KyltЕсть база на постгресе 7.0.3 ...
Структуру таблицы узнать не удается - все нормальные визуальные редакторы (пгаадмин3, емс) к такому старому серваку не хотять конектиться, а те которые конектятся позволяют увидеть разве что список таблиц и сделать запрос

Попробуйте определить структуру таблицы:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
SELECT  nc.nspname AS table_schema,
        c.relname AS table_name,
        a.attnum AS ordinal_position,
        a.attname AS column_name,
        CASE
            WHEN t.typtype = 'd'::"char" THEN
            CASE
                WHEN bt.typelem <>  0 ::oid AND bt.typlen = - 1  THEN 'ARRAY'::text
                WHEN nbt.nspname = 'pg_catalog'::name THEN format_type(t.typbasetype, NULL::integer)
                ELSE 'USER-DEFINED'::text
            END
            ELSE
            CASE
                WHEN t.typelem <>  0 ::oid AND t.typlen = - 1  THEN 'ARRAY'::text
                WHEN nt.nspname = 'pg_catalog'::name THEN format_type(a.atttypid, NULL::integer)
                ELSE 'USER-DEFINED'::text
            END
        END AS data_type,
        CASE
            WHEN a.attnotnull OR t.typtype = 'd'::"char" AND t.typnotnull THEN 'NO'::text
            ELSE 'YES'::text
        END AS is_nullable
FROM pg_attribute a
   LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum, pg_class c, pg_namespace nc, pg_type t
   JOIN pg_namespace nt ON t.typnamespace = nt.oid
   LEFT JOIN (pg_type bt
   JOIN pg_namespace nbt ON bt.typnamespace = nbt.oid) ON t.typtype = 'd'::"char" AND t.typbasetype = bt.oid
WHERE a.attrelid = c.oid
AND a.atttypid = t.oid
AND nc.oid = c.relnamespace
AND a.attnum >  0 
AND NOT a.attisdropped
AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char")
AND (has_table_privilege(c.oid, 'SELECT'::text) OR has_table_privilege(c.oid, 'INSERT'::text) OR has_table_privilege(c.oid, 'UPDATE'::text) OR has_table_privilege(c.oid, 'REFERENCES'::text))
AND c.relname = 'your_table_name_here'
ORDER BY ordinal_position;

SQL отрабатывает на 7.3 (7.0.3 не имеем). Не забудьте заменить 'your_table_name_here'.
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560578
jaga
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
авторДля своего клиента мне нужны или делфевые компоненты или одибисишный драйвер - ничего из этого не посоветуеш?

ZeosDBO мне больше нравится.
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560673
Kylt
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
to Andrey Daeron: вот такое выдает на мой запрос:

070530.10:22:33.029 [3539] StartTransactionCommand
070530.10:22:33.029 [3539] query: SELECT count(*) FROM (select * from таблица) AS foo;
070530.10:22:33.029 [3539] ERROR: parser: parse error at or near "select"
070530.10:22:33.029 [3539] AbortCurrentTransaction
070530.10:22:41.613 [3539] StartTransactionCommand
070530.10:22:41.613 [3539] query: select * from таблица
070530.10:22:41.665 [3539] ProcessQuery
Server process (pid 3539) exited with status 139 at Wed May 30 10:22:45 2007
Terminating any active server processes...
070530.10:22:45.158 [3373] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.159 [3384] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.160 [3416] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.160 [3418] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.162 [3419] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.162 [3538] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.173 [3373] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.198 [3375] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.228 [3416] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.234 [3419] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.252 [3383] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.254 [3382] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.316 [3373] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.347 [3419] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.355 [3382] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.356 [3378] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.366 [3377] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.385 [3381] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.387 [3382] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.407 [3414] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.418 [3397] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.430 [3376] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.434 [3378] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.438 [3379] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.451 [3381] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.465 [3380] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.476 [3414] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.486 [3397] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.498 [3376] NOTICE: Message from PostgreSQL backend:
070530.10:22:45.498 [3376] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.501 [3378] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.508 [3381] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.521 [3380] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.536 [3414] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.544 [3376] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
070530.10:22:45.556 [3380] NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
Server processes were terminated at Wed May 30 10:22:45 2007
Reinitializing shared memory and semaphores
070530.10:22:45.617 [3540] DEBUG: Data Base System is starting up at Wed May 30 10:22:45 2007
070530.10:22:45.617 [3540] DEBUG: Data Base System was interrupted being in production at Wed May 30 09:21:16 2007
The Data Base System is starting up
The Data Base System is starting up
...

зы: надо было взять в какието теги это безобразие, но я не знаю в какие
Опыта работы с psql не имееться, а нормального мануала я не нашел

to Thamerlan: щас попробую
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560731
Kylt
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
to Thamerlan: нет не работает - выпадает с тойже ошибкой, а в логах вообще ничего не нашел
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560751
Andrey Daeron
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Kyltto Andrey Daeron: вот такое выдает на мой запрос:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
 070530 . 10 : 22 : 33 . 029   [ 3539 ] StartTransactionCommand
 070530 . 10 : 22 : 33 . 029   [ 3539 ] query: SELECT count(*) FROM (select * from таблица) AS foo;
 070530 . 10 : 22 : 33 . 029   [ 3539 ] ERROR:  parser: parse error at or near "select"
 070530 . 10 : 22 : 33 . 029   [ 3539 ] AbortCurrentTransaction
 070530 . 10 : 22 : 41 . 613   [ 3539 ] StartTransactionCommand
 070530 . 10 : 22 : 41 . 613   [ 3539 ] query: select * from таблица
 070530 . 10 : 22 : 41 . 665   [ 3539 ] ProcessQuery
Server process (pid  3539 ) exited with status  139  at Wed May  30   10 : 22 : 45   2007 
Terminating any active server processes...
 070530 . 10 : 22 : 45 . 158   [ 3373 ] NOTICE:  Message from PostgreSQL backend:
        The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.
        I have rolled back the current transaction and am going to terminate your database system connection and exit.
        Please reconnect to the database system and repeat your query.
        Please reconnect to the database system and repeat your query.
Server processes were terminated at Wed May  30   10 : 22 : 45   2007 
Reinitializing shared memory and semaphores
 070530 . 10 : 22 : 45 . 617   [ 3540 ] DEBUG:  Data Base System is starting up at Wed May  30   10 : 22 : 45   2007 
 070530 . 10 : 22 : 45 . 617   [ 3540 ] DEBUG:  Data Base System was interrupted being in production at Wed May  30   09 : 21 : 16   2007 
The Data Base System is starting up
The Data Base System is starting up
...
зы: надо было взять в какието теги это безобразие, но я не знаю в какие

А в логах точно ничего нет? Т.е. вообще ничего? ИМХО дохнет серверный процесс, из-за каких-то проблем. Эти проблемы он должен (по идее) писать в лог. Я так подозреваю, что какой-то из файлов умер :(

На всякий случай - сделайте бекап данных (pg_dump) и попробуйте скопировать в другое место файлы БД. Возможно имеет место бед-кластер на винте.
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560797
Kylt
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
to Andrey Daeron: ну этот кусок текста, что выше, я из лога и выдрал. Может гдето есть еще какойто лог но я его просто не нашел (опыта работы с постгресом и линухом маловато очень)

Где можно почитать на тему pg_dump?
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34560873
Andrey Daeron
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Kyltto Andrey Daeron: ну этот кусок текста, что выше, я из лога и выдрал. Может гдето есть еще какойто лог но я его просто не нашел (опыта работы с постгресом и линухом маловато очень)

Где можно почитать на тему pg_dump?
Ну, че-то я так и подумал. Просто не сошлось с тем что в логах ничего нет.

почитать :)

7.0 - уже совсем давно было.

Дай Бог будет дамп, тогда все не таку ж для данных и плохо, если и он умрет - совсем плохо.

ЗЫ Еще бы поверзность диска проверить на наличие нехороших вещей из серии бедов.
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34561007
Thamerlan
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Попробуйте запустить VACUUM FULL. Он "потрогает" все блоки данных и если будут битые области, то в логах будут соответствующие сообщения.
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34561566
СергейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
ThamerlanПопробуйте запустить VACUUM FULL. Он "потрогает" все блоки данных и если будут битые области, то в логах будут соответствующие сообщения.

VACUUM FULL kak raz delat' ne nado, esli vy ne hotite rasproshatsia so svoimi dannymi...
Snachala sdelaite pg_dump, a potom mojno experimentirovat' s VACUUM FULL.
Ia by daje snachala sdelal tselikom kopiu directorii pg_data .
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34562224
Andrey Daeron
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
ThamerlanПопробуйте запустить VACUUM FULL. Он "потрогает" все блоки данных и если будут битые области, то в логах будут соответствующие сообщения.
Абсолютно согласен с СергейК . Попробовать можно но ТОЛЬКО ПОСЛЕ БЕКАПА pg_dump + копия директории с данніми (в одном из предыдущих постов я это уже написл) при этом заодно и гораздо более "мягко" потрогаются физические сектора.

В принципе PG весьма стабильный по части данных, и зачастую (ИМХО около 99%) проблемы такого характера - сбой железа. Ну и есть 1% "везунчиков".
...
Рейтинг: 0 / 0
Ошибка при запросе!
    #34563277
LeXa NalBat
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Kylt070530.10:22:33.029 [3539] query: SELECT count(*) FROM (select * from таблица) AS foo;В запросе нет ошибки, у вас существует таблица по имени "таблица"?
...
Рейтинг: 0 / 0
15 сообщений из 15, страница 1 из 1
Форумы / PostgreSQL [игнор отключен] [закрыт для гостей] / Ошибка при запросе!
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]