r hot standbys. As a consumer-web startup, with no
SLA, and not a huge database, and if we ever do have to recover from
downtime it's ok if it takes longer.. is there a reason NOT to always run
with something like checkpoint_segments = 1000, as long as I leave the
timeout at 5m?
Jay Levit
IW, I saw this behavior when upgrading a 9.0 database (which had cube and
earthdistance installed, but no cube or earthdistance objects in the
database other than UDFs) and using the CREATE EXTENSION FROM unpackaged syntax.
Jay Levitt
--
Sent via pgsql-general mailing list (pgsql-general@postgresq
Greg Sabino Mullane wrote:
update pg_database set datallowconn = false where datname = 'foobar';
That's perfect - thanks. Now I can (I think) do this:
pg_restore -d rails_dev_new
[wait]
psql template1
update pg_database set datallowconn = false where datname = 'rails_dev';
select pg_termi
loses focus, you refresh the browser, Rails automatically reloads the
changed code, you see the change. (There are three different browser
extensions that will automatically refresh your browser, too, in case that
was too hard.)
TL;DR: Reduce friction -> more frequent database updates -&
Our development workstations maintain a local copy of the production
database (which has been small enough that this is workable right now, and
preferable to having a test database with generated fake data). We've been
doing this by rsync'ing a compressed pgdump from the production server,
dro
Craig Ringer wrote:
it's a *bit* of a tiny use case.
It certainly is.
Jay
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Alban Hertroys wrote:
select questions.id from questions
join (
select u.id from users as u
group by u.id
) as s
on s.id = questions.user_id
where questions.id = 1;
You could write that as:
select questions.id
from questions as q
where exists (select 1 from users as u where u.id = q.user_id
Merlin Moncure wrote:
SQL has a very powerful abstraction feature: it's called a view. Good
use of views is a key design feature for complex databases.
Functions are generally not a good choice for query abstraction unless:
One more:
* You want contextual queries.
(I guess this is a special
Merlin Moncure wrote:
Breaking your large queries into functions OTOH can make significant
changes to the plan, often to the worse.
As an end-user, I think this is an area where PostgreSQL could really stand
out (that and the moon launch). In Rails-land, you don't have The DBA that
writes qu
Steve Crawford wrote:
On 12/01/2011 02:01 PM, Jay Levitt wrote:
Is there a way to load multiple .sql files in a single transaction?
Alternately, since -1 basically wraps your input in a BEGIN...your
statements...COMMIT you could do that yourself with a begin.sql and commit.sql:
cat begin.sql
Is there a way to load multiple .sql files in a single transaction? It looks
like "psql -f file1 -f file2" or "psql -f file*" was a WIP patch that never
happened, and from what I can tell, psql ignores the -1 parameter when
reading from STDIN, so I can't cat them together either:
$ cat > am_i_
. Our volume is fairly low, the tables are fairly small, we have
complete logs.
How can I troubleshoot to see what might have happened? Or is this a known
bug in 9.0.5?
Jay Levitt
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Sometimes the planner can't find the most efficient way to execute your
query. Thanks to relational algebra, there may be other, logically
equivalent queries that it DOES know how to optimize.
But I don't know relational algebra. yet. (Date/Codd is a sleeping pill.)
I need more experience fi
I got tired of this:
psql:lib/sql/similarity.sql:97: ERROR: column o.user_id does not
exist at character 426
So I wrote this:
https://github.com/jaylevitt/find_psql_error
And you call it like this:
find_psql_error "psql:lib/sql/similarity.sql:97: ERROR: column
o.user_id does not exist at ch
14 matches
Mail list logo