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

1d
comment Postgres uses a lot of cpu
The naptime looks a bit long, but who knows - one has to monitor the system to figure it out. I would bet that PostgreSQL writes a lot of temp bytes to disk because of the low shared_buffer - try to increase it first before digging into some more complicated stuff. BTW, how big your DB is? How much RAM do you have? OS and kernel version?
1d
comment Postgres uses a lot of cpu
24 MB of shared_buffers is extremely low. Have a look at postgresql.org/docs/9.4/static/…
2d
comment Which of these database designs is normalized?
This one still has the same problem I asked about.
2d
comment PostgreSQL query - works locally but not on AWS RDS
Deadlocks normally occur because two processes try to lock the same resources (tables, rows, whatever in your case) in different order. Try to specify common ordering (for example, using SELECT ... FOR UPDATE in case of updates).
May
20
comment Starting the Database Server postgres
Can you start an application as stophface? I wouldn't expect it to be very different in the case of postgres. You may want to have a look at the apps running on your local machine - are all of them started by some admin user?
May
20
comment SQL Server - Best practices on debugging extremely complex stored procedures
Is there a specification that describes that 'system'?
May
20
comment Starting the Database Server postgres
I don't understand why would you do that - is there anything you dislike in the postgres OS user?
May
20
comment Unable to point out Exact cause behind anonymous block failure(Postgresql)
@Colin'tHart Or, even better, use dollar quoting: postgresql.org/docs/9.4/static/…
May
20
comment Starting the Database Server postgres
Exactly that is the problem and thus you already have the answer. Running the DB with an admin role is a bad idea. See: postgresql.org/docs/9.4/static/postgres-user.html
May
20
comment When to include and exclude products from a webshop database?
I am afraid this will be closed as 'Primarily opinion-based'. Otherwise, in smaller systems (measured by the number of customers/orders/SKUs), I would possibly keep all the data in one place. If you plan to grow big, having the logical groups of tables separated might give a bit more room to play with when scaling out. But my main concern would be this: if the data returned to the application has to be aggregated often, then the DB might be a better place for doing it. This also means that keeping the tables in the same DB is better.
May
20
comment Which of these database designs is normalized?
Is a fiscal year really bound to a company? (I am no financial expert, just asking.) If yes, what will prevent you from coupling a fiscal year of company X with a branch of company Y?
May
20
comment Select Multiple Values from Same Column; one sql statment and split into separate columns
Do you want a pivot?
May
20
comment Tuning a Postgres INSERT only database
How often will this thing being queried? Should the queries be really real-time, or is a (possibly very small) delay acceptable?
May
20
comment Print to console as SQL executes
SELECT 'some text'; \echo of a psql command, you cannot use it in pgAdmin. If you want an error-like message (like a warning or such), you can create a pl/pgsql function that emits a message of the desired level using an incoming parameter, like the one I used here.
May
19
comment Why can't we write ddl statement directly into the PL/SQL block
Are you asking or answering?
May
19
comment Warm Standby PostgreSQL 9.4 error; FATAL: the database system is starting up
My guess is that the 'slave' is trying to apply WAL segments - but it starts from an invalid point. You need to create a base backup (as opposed to a regular one, taken with pg_dump) to start with. Seehttp://www.postgresql.org/docs/9.4/static/warm-standby.html#STANDBY-SERVER-SE‌​TUP
May
18
comment PostgreSQL: options for large table
@Vérace this is PostgreSQL ;)
May
18
comment PostgreSQL: options for large table
Have you tried to move the varchar(32) column out to a separate table and do joins when querying? I am wondering how much time the uniqueness check takes on inserts. Anyway, 5 hours for inserting a million rows really suggests a trigger or similar, just like @JackDouglas said above.
May
16
comment Autovacuum on windows
When posting config, please always remember to remove all commented-out lines. That way one could possibly find the relevant settings...
May
15
comment How to load multiple files into a foreign table in POSTGRESQL?
Could you possibly merge the files?