Joined October 2012
·

Matt Keranen

DW/BI Architect at Highwinds
·
SE US
·
·
·

At some point a Postgres version moved or renamed the pg_tablespace.spclocation column.

IIRC that was because the final \n is added to the line automatically by the print statement. Redis protocol does not like extra carriage returns. I could probably use a printf and be more explicit.

If put in a shell script, $1 is the name of the ZFS snapshot to send, and $2 is the name of the filename the compressed snapshot is stored in (the first and second args passed to the script).

Posted to Query MS SQL Server from Linux over 1 year ago

Installation on CentOS 5.5 was a bit more effort. As documented in the driver README, I needed to download and build unixODBC 2.3.0 myself. Even though the MS installer claimed success in doing the same, it was not sufficient for the SQL driver.

Note, it also appears that the current unixODBC 2.3.1 version is not compatible, at least with the install script.

@bcap Used as an example on joining pg_stat_user_tables to the original query, then divide pg_total_relation_size(C.oid) by pg_stat_user_tables.n_live_tup

@dserodio Exact row counts in PostgreSQL come from SELECT COUNT(*) which can be slow as a full table scan, but a close estimate can be found in pg_stat_user_tables.n_live_tup

Joining pg_stat_user_tables.relname and schemaname to pg_tables.tablename and schemaname would allow you to calculate average row size, and average size by index and tablespace.

Achievements
406 Karma
40,202 Total ProTip Views