R
Railway16mo ago
root

Postgres: random inexplicable OOM

Project ID: N/A (any of them) When trying to run the query SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' on any database, it gives an out-of-memory error. When I add a semicolon, my app segfaults. A snippet of my code:
public Gtk.Widget overview_page() {
var box = new FlowBox();
box.append(info_card("Properties",
URL: connection.url));
GLib.print("hi\n");
var tables_box = new Box(VERTICAL, 2);
GLib.print("hi\n");
var tables = db.exec("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'");
GLib.print("hi\n");
var status = tables.get_status();
GLib.print(db.get_error_message());
foreach_result(tables, (i, j, v) => {
if(j == 0) {
tables_box.append(new Label(v));
}
});

box.append(titled_section("Tables", VERTICAL, tables_box));
return box;
}
public Gtk.Widget overview_page() {
var box = new FlowBox();
box.append(info_card("Properties",
URL: connection.url));
GLib.print("hi\n");
var tables_box = new Box(VERTICAL, 2);
GLib.print("hi\n");
var tables = db.exec("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'");
GLib.print("hi\n");
var status = tables.get_status();
GLib.print(db.get_error_message());
foreach_result(tables, (i, j, v) => {
if(j == 0) {
tables_box.append(new Label(v));
}
});

box.append(titled_section("Tables", VERTICAL, tables_box));
return box;
}
(ignore the debugging™️)
2 Replies
Percy
Percy16mo ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Percy
Percy16mo ago
No project ID was provided. Closing thread.