Here is an example.
static_page_id | filename | folder_id | show_comments_p
----------------+-----------------------------+-----------+-----------------
2475 | /static1.html | 2472 | t
2478 | /static-folder/static1.html | 2477 | t
(2 rows)
static_page_id 2478 is supposed to be deleted. It lives in static_folder 2477. Here is what I am getting in the log:
[23/Oct/2001:05:41:47][771.8197][-conn1-] Notice: Querying 'select __exec_6_del ete_old_files ();' NOTICE: ***Deleting id:2478 NOTICE: *** Number of rows deleted: 1 NOTICE: Deleting symlinks... NOTICE: Unscheduling item... NOTICE: Deleting associated revisions... NOTICE: Deleting associated item templates... NOTICE: Deleting item relationships... NOTICE: Deleting child relationships... NOTICE: Deleting parent relationships... NOTICE: Deleting associated permissions... NOTICE: Deleting keyword associations... NOTICE: Deleting associated comments... NOTICE: identifier "journal_entry__delete_for_object" will be truncated to "jo urnal_entry__delete_for_objec" NOTICE: Deleting content item... [23/Oct/2001:05:41:47][771.8197][-conn1-] Error: Ns_PgExec: result status: 7 message: ERROR: -20000: Folder ID 2477 (/static-folder) cannot be deleted because it is not empty.So it looks like performing both these deletes in the same function is causing the problem.