Hi, yesterday there was a problem with postgresql ...
# support
f
Hi, yesterday there was a problem with postgresql disk size, the disk was full and nothing could be done. Then statefulset postgresql was deleted in order to create a new larger disk. Yes some number of events were lost, but the created disk for postgresql is still growing. How can I fix this problem?
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
h
Can you connect to the postgres and run a query to list what all tables are present?
f
@helpful-island-54641 Yes off course
@helpful-island-54641 which one do you need to do?
h
rt i guess
f
@helpful-island-54641 I’m not quite following you
Copy code
jobsdb=# select pid, usename, NOW()-query_start as duration, query_start, client_addr, state, case when query like '%autovac%' then 'yes' else '' end as autovaccuum, regexp_replace(left(query,50), E'[\\n\\r]+', ' ', 'g' ) from pg_stat_activity where state <> 'idle' AND query NOT LIKE '%INSERT INTO robocop_image_hashes%' AND query NOT LIKE '%SELECT ad_id, images FROM ad_history_reports%' AND query NOT LIKE '%START_REPLICATION SLOT%' and  NOW()-query_start > interval '1 second' order by query_start;
  pid  | usename |    duration     |          query_start          |  client_addr  |        state        | autovaccuum |                                       regexp_replace
-------+---------+-----------------+-------------------------------+---------------+---------------------+-------------+---------------------------------------------------------------------------------------------
 16398 | rudder  | 00:38:18.922364 | 2023-09-15 11:42:48.695088+00 | 10.33.155.226 | idle in transaction |             | INSERT INTO gw_journal (operation, done, operation
 16098 | rudder  | 00:38:18.921727 | 2023-09-15 11:42:48.695725+00 | 10.33.155.226 | active              |             | DELETE FROM "pre_drop_gw_job_status_531"                                                WHE
  6799 |         | 00:01:36.074463 | 2023-09-15 12:19:31.542989+00 |               | active              | yes         | autovacuum: ANALYZE public.pre_drop_gw_jobs_562
  8595 |         | 00:00:15.532048 | 2023-09-15 12:20:52.085404+00 |               | active              | yes         | autovacuum: ANALYZE public.gw_jobs_564
  9194 |         | 00:00:01.287356 | 2023-09-15 12:21:06.330096+00 |               | active              | yes         | autovacuum: ANALYZE public.arc_jobs_656
40 minutes trying to do the operation
Copy code
jobsdb=# select * from pg_stat_activity where pid = 16098;
 datid | datname |  pid  | usesysid | usename | application_name |  client_addr  | client_hostname | client_port |         backend_start         |          xact_start           |          query_start          |         state_change          | wait_event_type | wait_event | state  | backend_xid | backend_xmin |                                                                         query                                                                         |  backend_type
-------+---------+-------+----------+---------+------------------+---------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------------+------------+--------+-------------+--------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+----------------
 16384 | jobsdb  | 16098 |       10 | rudder  | rudderstack-0    | 10.33.155.226 |                 |       44238 | 2023-09-15 11:42:12.201502+00 | 2023-09-15 11:42:48.695492+00 | 2023-09-15 11:42:48.695725+00 | 2023-09-15 11:42:48.695726+00 |                 |            | active |    16860699 |     16860164 | DELETE FROM "pre_drop_gw_job_status_531"                                                                                                             +| client backend
       |         |       |          |         |                  |               |                 |             |                               |                               |                               |                               |                 |            |        |             |              |                                                 WHERE NOT id = ANY(                                                                                  +|
       |         |       |          |         |                  |               |                 |             |                               |                               |                               |                               |                 |            |        |             |              |                                                         SELECT DISTINCT ON (job_id) id from "pre_drop_gw_job_status_531" ORDER BY job_id ASC, id DESC+|
       |         |       |          |         |                  |               |                 |             |                               |                               |                               |                               |                 |            |        |             |              |                                                 )                                                                                                     |
(1 row)
it’s trying to delete the data and can’t
h
Can you delete all the table entries with pre_drop prefix?
f
@helpful-island-54641 Yes, they were deleted and all the requests above are after the deletion.