Reputation
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 18 43
Newest
 Informed
Impact
~374k people reached

Apr
22
comment What is the best way to analyze free space in a postgres database and the grow of usage?
Just a followup to the previous: you can write a pl/pythonu function, for example, to achieve it in a single function call. You'll need superuser rights for that.
Apr
22
comment What is the best way to analyze free space in a postgres database and the grow of usage?
You can do a df -h in your OS, then, for example, \l+ from psql and compare what you find. I, as a PostgeSQL guy, have no idea what sys.dba_free_space reports, though.
Apr
21
comment Postgres - copy table INCLUDING CONSTRAINT doesn't include constraint
@Colin'tHart could you? Thanks a lot.
Apr
21
comment Why is Postgres on RDS maxing out on CPU every few hours?
60 MB shared_buffers? I have never seen a Postgres instance with this low value...
Apr
21
comment How to use except but excluding a column from the except clause comparison -psql?
The wording here is not very clear: 'Get all transactions from table 1 that has the exact same values on amount, email and date' - same as what? It would help if you presented some example data sets and the desired outcome.
Apr
20
comment Optimizing a geo search in Postgres
The parser does not optimize your query, it's the optimizer ;) Other than that, a table definition complete with indexes and other ornaments is needed, alongside with an output from EXPLAIN ANALYZE. Also, how the values 'are replaced with the proper numeric values at runtime'? Is this a prepared statement, some PHP magic or other?
Apr
17
comment Combine multiple queries into 1 query
To me it sounds like GROUP BY is your friend.
Apr
17
comment How to upgrade postgresql 8.4 to 9.4
If you take a dump of them, then no. You should anyway have regular backups that you test for recoverability, so this should be no issue at all. Also, if you choose to use pg_upgrade, it will keep your DBs - but taking a backup is a must in this case, too.
Apr
17
comment How to upgrade postgresql 8.4 to 9.4
@ZQL 8.5? That was never released officially...
Apr
17
comment How to upgrade postgresql 8.4 to 9.4
To be honest, the description is very clear on the linked page. Taking a dump means you have a dump for the case something does not work. That also means that you don't lose it. Furthermore, there is a link on that page pointing to how to actually install a newer version - for example, on Ubuntu, there is a postgresql-client-9.4 package that contains psql.
Apr
17
comment Sharing PostgreSQL database on one dual-boot machine without duplication (cross-platform)
This shows you that it won't work this way. The allowed values for certain parameters in postgresql.conf for Windows and non-windows are a bit different. Plus what @a_horse_with_no_name says. You may be able to set up a VM of some sort that can be started from both OSes.
Apr
17
comment Inaccurate count when using multiple count functions in PostgreSQL
@LucasNeo no, you did not answer Craig's questions at all.
Apr
16
comment PostgreSQL: raise error if planner needs to do an sequence scan
@guettli SELECT count(1) FROM thing WHERE t_created >= now() - interval '1 year';
Apr
16
comment PostgreSQL: raise error if planner needs to do an sequence scan
I am not sure if this does not give you more work than necessary. When you carpet bomb the DB with indexes based on assumptions about their necessity, you realize later that many of these are unused. (There are obvious cases where an index will be needed, but those are usually known already at physical data modelling time.)
Apr
15
comment FDW, replication and CREATE SERVER - will it work?
I am not sure from the quesiton, but if the FDW connects to a separate cluster located on the host of the master, it could work (and possibly even make sense).
Apr
14
comment The cost of left out join versus a select
There is absolutely no problem with a LEFT [OUTER] JOIN, it's a common myth, I guess. Read a bit about the N+1 issue, too: stackoverflow.com/questions/97197/what-is-the-n1-selects-issue
Apr
14
comment Postgresql match all in full text search
That sounds like a very nice performance sink :) On the other hand, I could not figure out a good solution for you.
Apr
12
comment Are file locations stored in PostreSQL catalog?
SELECT current_setting('data_directory');
Apr
10
comment Postgresql match all in full text search
Why would you do that?
Apr
8
comment 'ERROR: text search dictionary “unaccent” does not exist' during CREATE INDEX?
I've tried to replicate your issue but the index creation worked.