6,659 reputation
31436
bio website
location Berlin, Germany
age 38
visits member for 2 years, 8 months
seen 4 hours ago

May
20
comment Postgres live backup
Then why a hot standby and a plain failover are not an option?
May
20
comment Postgres live backup
I don't really get how do you plan to use the 'backup' database. What do you do with it when the primary fails? Regarding memory usage on the secondary, you can set shared_buffers to a rather low value (leave it at the default, for example) and then it won't use more.
May
15
comment Indexing a large static dataset
And (especially in the light of Craig's answer) what will you gain from an index on the timestamp column?
May
15
comment PostgreSQL Function: How to refer to individual column in record return by function
So, try to call SELECT * FROM circular_ref() instead of SELECT circular_ref().
May
13
comment Force drop db while others may be connected in postgresql
Let me suggest doing the first step like ALTER DATABASE mydb CONNECTION LIMIT 1. I would not touch the catalogs directly unless absolutely necessary.
May
9
comment How can I enable logging for a single function in PostgreSQL?
I could not make it working this way either. A possible workaround could be to get clock_timestamp() both on entry and exit and RAISE LOG with that information (or the difference or whatever).
May
8
comment Storing changes to stored procedure and triggers in PostgreSQL
postgresql.org/docs/9.3/static/event-trigger-definition.html I guess you can build your solution on this, you can write from the procedure defined from the trigger.
May
6
comment Postgresql create database with size & resize?
@CraigRinger how about putting the (default) tablespace on a restricted-size volume? This, at least, would remove the WAL from the equation.
May
5
comment MySQL Enums have non-intuitive behaviour, why?
Without explicitly telling what the problem is this question is not a good fit for the site, I guess. Could you please outline it in a few sentences? More detailed explanation could still be left for the article you linked.
Apr
28
comment PostgreSQL stored procedure to return rows or empty set
@ErwinBrandstetter I am always wondering how you keep finding these ancient questions :)
Apr
25
comment Get all partition names for a table
@Mavlarn thanks for pointing it out, after one year of staying here with that error :) Now fixed.
Apr
22
comment Is there a psql equivalent of bash's reverse-search-history?
@user664833 well, yes. Note that I am on Ubuntu.
Apr
18
comment Is there a psql equivalent of bash's reverse-search-history?
Have you tried Ctrl-r already? :)
Apr
11
comment Postgresql not working: error
If you remove postgres-xc, does your original installation work? Also, did you use some non-default directory layout?
Apr
11
comment Select query for returning different data based on creation time
@ypercube you are welcome :) Also, feel free to write up a nice solution using it, I don't have the time right now...
Apr
11
comment Select query for returning different data based on creation time
@ypercube I tried it now on a number table, it works (as all other aggregate functions, in theory - I mean I haven't tried all :D)
Apr
11
comment Select query for returning different data based on creation time
So what COALESCE is supposed to do there? Anyway, what you included is not a query, just a piece of it. Also, without example data it is hard to get what you are asking about. Still, I guess you want to do something like SELECT (SELECT {yesterday}), (SELECT {last_week}), (SELECT {last_month})
Apr
10
comment How do I determine if a column is defined as a serial data type instead of an integer based off the catalog?
Yes, it is like that.
Apr
10
comment How do I determine if a column is defined as a serial data type instead of an integer based off the catalog?
@Alex there is an other pseudotype called bigserial, I referred to that.
Apr
10
comment log_min_duration_statement setting is ignored
Let me add that the default for log_statement is none, so not setting it or setting to none has the same effect.