uot;30", "y"=>"fred"')) b;
key | value
-+---
y | c
and aggregate it back into a hstore like this:
regress=# SELECT hstore( array_agg(diff.key), array_agg(diff.value) )
FROM (SELECT a.key, a.value from each(hstore('"x&quo
disk I/O and
locking.
Every index you add slows down modifications to the table a little bit,
because it has to be kept up to date. It also uses more disk space and
takes time for VACCUM.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to
On 07/12/2012 02:16 PM, Bartosz Dmytrak wrote:
it doesn't metter - conclusion is: table is growing. You are right,
for other purposes it should be better to check total size.
In that case, I'm not sure I understand what you were actually asking in
your initial question.
--
Craig Ringer
to a file, it's possible dynamic
linker messages might appear there but not be captured by Pg for
logging. I don't see how you'd redirect that without stopping and
starting the server, which you don't want to do.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Re-titled thread.
On 07/11/2012 11:13 PM, Gregorio, Albert wrote:
I am working with PostgreSQL 9.1.3 -- I setup a master and standby --
Initiated replication and verified that it was occurring -- Failed
over from master to standby and verified that the database could be
updated on the new ma
pretty(pg_relation_size('test.limits'::regclass));
and I realized table size is 32 kB.
Use pg_total_relation_size to include TOAST tables too.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
lso work AFAIK, causing a
serialization failure and forcing the app to re-issue the transaction.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
rvice at all.
Tomorrow i will be sitting behind PC #2, how should i install it..
Check the command lines for the EnterpriseDB installer. I'd be surprised
if it didn't have a binaries-only option that allowed you to skip
database creation and creation of a Windows service entry, so yo
o find that the only mention of this is at the very
bottom of this page:
http://www.postgresql.org/docs/9.1/static/functions-sequence.html
as it's an important property of sequences and one that shouldn't just
be a footnote.
I'd use a real table for this job.
--
Craig Ringer
one Python's SSL support was built against.
Since you've neglected to describe your client or server environments at
all, it's hard to say more.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
SchemaSpy ( http://schemaspy.sourceforge.net/).
--
Craig Ringer
than hunting blindly with EXPLAIN ANALYZE it's better to just
turn log_temp_files on and see what's reported.
--
Craig Ringer
ndexing it. etc.
Honestly, if you don't have something you want to _achieve_ it's
probably mostly going to be boring. What do you want to do, to get out
of this?
--
Craig Ringer
Here's the test program, btw:
https://github.com/ringerc/scrapcode/tree/master/scripts/pg_forktest
pgfork.py is a home rolled fork() horror.
pg_mp.py is the same thing done with Python's multiprocessing module.
--
Craig Ringer
g wrong in your app's innards. Yes,
that's a lot of hot air and handwaving, but it fits - you're getting an
error saying that psql is trying to operate on a socket that isn't there.
The fact that there's nothing in the system logs or Pg logs just adds
weight to that. I
r* thinks exist by examining
pg_stat_activity .
Check dmesg and the PostgreSQL server logs to see if you're hitting
operating system limits. Look for fork() failures, unexplained
segfaults, etc.
--
Craig Ringer
x27;s called an UPSERT or MERGE operation.
PostgreSQL doesn't have any native support to do this for you. Doing it
right is surprisingly tricky. This is the best article I've seen on the
topic:
http://www.depesz.com/2012/06/10/why-is-upsert-so-complicated/
--
Craig Ringer
der an ETL tool like
Penatho. http://kettle.pentaho.com/
For very very fast loading of bulk data, consider pg_bulkload
http://pgbulkload.projects.postgresql.org/ . It's only worth the hassle
if your load will take many, many hours without it.
--
Craig Ringer
good thing; I don't know. It's certainly not going to
happen anytime soon, as I've seen nobody interested in pursuing
per-database WAL and it'd be a monsterously huge engineering effort anyway.
For now, you'll have to live with disconnecting sessions from your DB
before cl
f antivirus software has
race conditions and bugs related to its file access interception, and Pg
appears to be particularly good at triggering them.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresq
k-you. Always dump with
pg_dump from the newer database.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
ease-8-4.html>/static/release-9-1.html
<http://www.postgresql.org/docs/9.1/static/release-9-1.html>
Do not just try to upgrade your production database. Do a test with a
test copy first, and test your application against it; don't just assume
it'll all work.
--
Craig Ringer
to get information on the current directory - probably your
home dir - but the _postgres user doesn't have access to it.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 06/25/2012 02:50 PM, Stefan Schwarzer wrote:
> Craig Ringer wrote:
I'm puzzled about why you don't appear to be looking at the server error logs
(/usr/local/pgsql-9.1/data/pg_log) during troubleshooting. They're your main
source of info.
Hmm, I guess it's because
of the entire postgres folder
in order to run some corruption recover method
Great.
--
Craig Ringer
On 06/24/2012 03:42 PM, Robert Poor wrote:
Craig:
On Sun, Jun 24, 2012 at 12:06 AM, Craig Ringer wrote:
That [implementation of UPSERT] is incorrect; it's subject to several nasty
races.
The best article I've seen on this is here:
http://www.depesz.com/2012/06/10/why-is
races. The best article
I've seen on this is here:
http://www.depesz.com/2012/06/10/why-is-upsert-so-complicated/
(thanks again depesz for your great articles).
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
l/pgsql-9.1/data
and suddenly postgres runs….
You really should be able to use pg_ctl though.
I'm puzzled about why you don't appear to be looking at the server error
logs (/usr/local/pgsql-9.1/data/pg_log) during troubleshooting. They're
your main source of info.
--
Craig R
tgresql.org/docs/9.1/static/datatype-binary.html .
--
Craig Ringer
t's rarely used.
--
Craig Ringer
n the folder with the
PostgreSQL executables etc in it (by default it contains the datadir,
but not always, so may need to be set separately), *AND* set an
exception for the postmaster and postgres.exe executables.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.or
re.
Second, why? What does the transaction count tell you? How will you
account for work done by PgAgent (if used), via dblink, etc?
I guess I'm unsure what you're trying to accomplish.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make c
portant than others.
When put that way, it seems blindingly obvious. You have a talent for
making a devastating point very succinctly.
--
Craig Ringer
POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088 Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/
--
simplest/safest/easiest path is to have the backend
always kill the tx and nobody's wanted to add a communication channel to
let psql tell the backend it's working interactively?
--
Craig Ringer
POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088 Fax: 08 9388 2258
ABN:
activity, etc for different users so one
user's load can adversely affect other users.
While most people's use of Pg doesn't suffer for these limitations, I
suspect you'll need to know about them if you're trying to offer
multi-tenant hosting.
--
Craig Ringer
r anyone's fired
up an Azure VM (Linux or Windows) and done some tests, focusing
particularly on crash-safety, fsync rates, and I/O performance. If not,
I might have to have a play.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to yo
s probably possible in weaker
installations.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Error log from PostgreSQL server logs?
Try enabling log_statement='all' in postgresql.conf .
--
Craig Ringer
would be the solution.
Yep, that's the immediate cause of failure, and I missed that in my
reply so I'm answering the *next* question. Whoops, sorry.
If you remove the name and use positional style, the function still
fails for a different reason, as per my post following.
--
Crai
uot; WHERE id =
'||quote_literal($1);
RETURN QUERY SELECT * FROM "B";
END;
$$ LANGUAGE 'plpgsql';
Note that this will fail when run a second time. You will have to DROP
the view, and you will be subject to all sorts of exciting cross-session
race conditions. Yo
ll C functions, because they have
*total* access to all of PostgreSQL and can bypass all security and
authentication completely.
--
Craig Ringer
dump made on Linux to a Windows
box or vice versa due to a limitation/bug in how PostgreSQL and
pg_restore handle locales and encodings. You must use the CREATE
DATABASE followed by separate pg_restore method in that case.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-genera
t the "make" process gives me this:
Looks like your dev env is broken or incomplete.
--
Craig Ringer
uild with --enable-debug, strip the debug info
into external symbols packages using "strip --only-keep-debug". There
isn't much point unless disk space consumed by executables is a big
concern, though.
I always use --enable-debug when building Pg. I rarely need the symbols,
but it's handy to have them when I do.
--
Craig Ringer
ace?
http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD
--
Craig Ringer
/q /c:"msiexec /i vcredist.msi /qn /l*v
%temp%\vcredist_x86.log"|
... not sure why yet.
--
Craig Ringer
(a) Silently skipping installation and returning success; or
(b) installing themselves into WinSxS whether or not a newer version
exists already
They absolutely should not be failing. Can you please post your
installation logs?
--
Craig Ringer
but importantly
benchmark something comparable to your workload. There's no point
running a benchmark that's nothing like your workload and drawing
conclusions about your workload from it.
--
Craig Ringer
master solution.
PgPool-II doesn't offer mutli-master operation. Not much does.
Multi-master is very difficult to get right, and even harder to make fast.
Are you really sure it's what you want? Failover is often a much, MUCH
simpler and more efficient approach.
--
Craig Ringer
--
Sent
Windows 7 install. They work fine
everywhere I use them.
To find out why the MSVC++ runtime is failing to install on your machine
you need to collect the installer log. See:
http://wiki.postgresql.org/wiki/Troubleshooting_Installation
--
Craig Ringer
ly enable it, they're fast to
start, many support JIT compilation, etc etc. Given how much less modern
JavaScript sucks, I expect to see tons more PL/JavaScript once Pg 9.2
starts seeing adoption.
--
Craig Ringer
On 05/30/2012 10:01 AM, Adrian Klaver wrote:
On 05/29/2012 06:56 PM, Craig Ringer wrote:
On 05/29/2012 02:27 AM, Alexander Reichstadt wrote:
Hi,
I am trying to "simply" export my postgres database from one server
and then import it into another. I thought I could use PhpPgAdmin
d Windows recently:
http://blog.ringerc.id.au/2012/05/postgresql-usability-pgadmin-iii-and-pg.html
and would be interested in your comments/experiences because more
knowledge will help produce a better UI if I ever get the time to have a
go at addressing some of this, or if someone else does.
--
Craig Ringer
no agreement has been reached on the
correct approach and nobody has stepped up to implement it.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
d
more issues.
It's my intention to break that down into specific problem areas and
points, I just thought it was worth getting a few initial impressions too.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www
7;d propose having psql cache the first error (ie:non-zero SQLSTATE
response) it gets in memory, and emit that when it exists, eg:
The first error was: ERROR: role "postgres" already exists
... in response to the command: CREATE ROLE postgres;"
Anway, I hope my rant/critique/whine is helpful.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
uot;
entries for non-PostgreSQL parts of the call path. The stack trace might
be useless, but might not be too.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
made a lot of things way
simpler than they are in UTF-8 and was well and truly worth the storage
bloat IMO. Pity Unicode had to grow again and break the assumption.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 05/14/2012 12:12 PM, Pham Ngoc Hai wrote:
I'm running PostgreSQL 9.1.3 on x86_64-unknown-linux-gnu, compiled by
gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3), 64-bit
on CentOS release 6.2 (Final)
Recently we encountered postmaster segfault, what the core dump gives
me is:
Did you ever see any
are it's a hardware fault or (small
chance) kernel bug. If Pg could cause a crash like that it'd be a kernel
DoS vulnerability, but I'm much more inclined to suspect the hardware
even without the dodgy history.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgr
Usually recursive common table expressions (`WITH RECURSIVE') are used
to handle queries on self-referential tables. Have a look in the
documentation for more information.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your sub
distributed as the EnterpriseDB One-click
installers do support SSL, yes.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
crash"? Check out the link
I sent in my last post for info on how to do it using windbg or vc++
express.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
on overloading is no good
--
Craig Ringer
y luck.
I was running with fsync off, how postgresql behave about index
consistency with fsync on?
Indexes will always be consistent when fsync is on.
You were running in a mode that says "be fast even if you eat my data".
It ate your data. If you don't tell it to, it won'
irectives compilation I need as gcc in windows and Linux.
If you are using a standard binary distribution of PostgreSQL then yes,
you should use Visual C++, preferably the same version of Visual C++
that was used for that version of PostgreSQL. Specify your version of Pg.
--
Craig Ringer
nt* over that many tables.
If the data being partitioned by is not only ordinal but interval too,
then it'd be possible to define regular intervals for partitioning and
build a bitmap for matching tables. That'd be a fun honours / masters
project, but hardly something suitable for trying to hack into a
production setup.
--
Craig Ringer
t delete or update records from a trigger before they've
been copied to the new table and committed.
--
Craig Ringer
it failed to start. Probably
permissions. See:
wiki.postgresql.org/wiki/Guide_to_reporting_problems
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
iling lists or on Stack
Overflow anyway.
--
Craig Ringer
On 29/12/2011 2:48 PM, saqi...@igis.nust.edu.pk wrote:
Hi every1 how are u all??? Members i am new in postgres and want to
work on pgrouting but i am facing some issue will u please help me???
I have loaded my line shapefile in pg
ns or improvements to the code below?
Only that it might be less hassle to wrap gethostname from pl/perl or
pl/python rather than adding a new C function, particularly if this is
only for DB testing and is not performance critical.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-ge
s
important but heavily loaded DBs, big reporting queries on other DBs, etc.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
emely high selectivity index
(say 1:1000 or more) where you want to keep the index tiny, fast, and
very quick to scan.
I guess ideally Pg would be able to deduce that the index value is
always the same and just store a page list rather than a b-tree, but
it's a bit of a tiny use case.
On 12/15/2011 01:16 AM, Andreas wrote:
Am 14.12.2011 14:28, schrieb Craig Ringer:
On 14/12/2011 8:32 PM, Andreas wrote:
Hi,
I asked elsewhere about the best way to store db credentials within
a user-session of a web-app.
Where? Link?
Well, it was on the general list of php.net.
I read
a CLUSTER or VACUUM FULL
run I'm not sure what to advise.
--
Craig Ringer
x27;s currently
operating as. Related to:
http://stackoverflow.com/questions/8432636/in-postgresql-are-partitions-or-multiple-databases-more-efficient/8439618#8439618
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
e log warning when this condition is detected, since
I've seen several people confused by it over time.
--
Craig Ringer
count must **NOT** have administrator rights. Grant the
account full control over its data directory and REMOVE its
administrator rights.
--
Craig Ringer
WITH expressions.
There's been talk of a Pg extension that allows optimisation through
WITH, but it's not currently possible.
Another option is to wrap things up in SQL functions or views.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make
relies on the OS cache.
The OS will *probably* cache the contents of mytable_one when you do a
seqscan on it, but it might not, and it might be correct in not doing so.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
ially since it sounds from recent comments like even on
Oracle those priority features aren't what you'd call friendly.
Personally I'd choose good performance monitoring over user/query
priorities any day. With good perf monitoring I can script from the
outside I have a lot more contro
On 12/09/2011 10:35 PM, Adrian Klaver wrote:
First question, are you sure you are connecting to same database in
both the remote and local case?
It strikes me that this is another use case for being able to get the
system identifier from SQL :-)
--
Craig Ringer
--
Sent via pgsql-general
ld produce
much the same result with a lot less complexity. It's one of the reasons
I'd love to see in-core pooling, because I don't see how an out-of-core
solution can maintain session state like advisory locks, HOLD cursors, etc.
--
Craig Ringer
--
Sent via pgsql-general mailin
On 12/08/2011 08:27 PM, Simon Riggs wrote:
On Thu, Dec 8, 2011 at 11:24 AM, Craig Ringer wrote:
Areas in which Pg seems significantly less capable include:
Please can you explain the features Oracle has in these area, I'm not
clear. Thanks.
Marc has, as I was hoping, done so much b
pool
connections I'm generally reluctant to use setups where the app auths
against the database with a given user ID and password directly.
--
Craig Ringer
On 12/08/2011 08:53 PM, Tomas Vondra wrote:
On 8 Prosinec 2011, 12:24, Craig Ringer wrote:
- admission control, queuing and resource limiting to optimally load a
machine. Some limited level is possible with external pooling, but only by
limiting concurrent workers.
o d
The first thing I'd
On Dec 8, 2011 1:27 PM, "Chris Travers" wrote:
>
> Additionally I am not entirely sure what he means by the last point.
> If you look at the work that NTT along with EDB has put into
> Postgres-XC, for example, it looks to me like the Postgres ecosystem
> is growing by leaps and bounds and we are
n enterpriseDB version
As EXEC proc.
If you're connected to EnterpriseDB, I'd expect that.
If you're connected to PostgreSQL, maybe PgAdmin is translating EXEC
into a SELECT ?
--
Craig Ringer
tually using PostgreSQL.
You need to contact EnterpriseDB technical support for assistance if you
are using EnterpriseDB. If it's another product, please specify.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
27;ve got the wrong
data types;
- You might need to specify explicit data types for your parameters in
the ODBC call, eg 'Active'::text . Please show your function definition
(at least the line with "CREATE OR REPLACE FUNCTION ( parameters )
RETURNS ..." on it) so we can see wh
On 06/12/11 22:51, Daniel Migowski wrote:
> Continuing this talk on general, as requested by Craig.
>
> I have a functional Index on a table that is relative expensive to calculate.
> Now I noticed on every update of even index-unrelated fields of the table the
> index function is calculated agai
nto Linksys, etc and get a better
understanding of how it all works. Opinions do vary, and mine's just one
uninformed opinion; if you want a good one go ask the SFLC.).
--
Craig Ringer
leased, have a look at what Linksys (now Cisco) are releasing
- it's their kernel and any (L)GPL userspace components, but not their
own stuff.
Note that relying on a full-GPL library that you directly link to
clearly *does* require you to license your own code under the GPL.
Anything
ures like hstore through a layer that tries to
be db-independent and purely relational. I don't have any experience
with Castle ActiveRecord. When I've used hstore with hibernate I've
always done it by direct native queries.
--
Craig Ringer
complicated - If I want to query for 100 recipes
and also display all their tags, I'd have to use an INNER JOIN and
consolidate the rows, or use a nested SELECT and aggregate on the fly.
That'll get slow. It'll work and is IMO better than all the other
options you suggested, but I
issing chunk number 0 for toast value 2550017 in pg_toast_17076
Now that you've taken a file-level backup (hopefully copied to a
different computer), do you think it might be worth doing an fsck of the
file system? I'm wondering if your underlying storage has been doing
something do
e you can use a compressed SSH tunnel, compressed VPN, etc.
Alternately, investigate 3rd party replication options like Slony and
Bucardo that might be better suited to your use case.
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to yo
indicate something
unusual.
All pg threads are sleeping (S state).
I will try to reproduce this, this time with a smaller initial disk size...
Try checking where the postgres processes are waiting, too:
ps -C postgres -o wchan=
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql
ncounter one and post that as a reply.
Maybe with a bit more info we can see what might be going on.
--
Craig Ringer
15b11 in readline_internal_char () from
/lib64/libreadline.so.6
#4 0x00369d216065 in readline () from /lib64/libreadline.so.6
... etc ...
--
Craig Ringer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
401 - 500 of 1788 matches
Mail list logo