Re: [GENERAL] Server crashed, now cannot start postgres [FIXED]

2016-09-12 Thread Tom Lane
kernels (~2009) might've had issues with setting this up wrong, but anything in current support ought to get it right ... regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Server crashed, now cannot start postgres

2016-09-12 Thread Tom Lane
the permissions on /dev/shm are bollixed? As a temporary workaround, you could probably set dynamic_shared_memory_type = none in postgresql.conf (I'm assuming it's set to posix now). I do not think that disables any very critical functionality in 9.5, but it's a hack not a solution.

Re: [GENERAL] Duplicate data despite unique constraint

2016-09-11 Thread Tom Lane
'; You definitely want to reindex after the data cleanup, since presumably it's corruption of a unique index that got you into this mess in the first place. But as long as it's only the index and not the table that's damaged, recovery is pretty straightforward. regards, t

Re: [GENERAL] Trigger is not working for Inserts from the application

2016-09-10 Thread Tom Lane
t;: 2}, {"labeltext": > "Other", "labelvalue": 3}, {"labeltext": "Don''t know", "labelvalue": 4}], > "target": {"place": "Sweden"}, "askfreq": "once", "whydesc": "Because I

Re: [GENERAL] Trigger is not working for Inserts from the application

2016-09-10 Thread Tom Lane
, and that there isn't another trigger undoing its work? (psql's \d command on the table should show these things.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Trigger is not working for Inserts from the application

2016-09-10 Thread Tom Lane
ries from applications because they invariably drop notices on the floor. I'd try RAISE LOG instead, and again watch the server log to see what the application is really doing. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] londiste re-create leaf node

2016-09-09 Thread Tom Lane
/lib/pgq_lowlevel.so: undefined symbol: oid_hash Looks like you built against a set of backend headers that is older than the server you're trying to run in. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscripti

Re: [GENERAL] How to assemble all fields of (any) view into a string?

2016-09-07 Thread Tom Lane
or that, it just hasn't gotten the love the other PLs have. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] a column definition list is required for functions returning "record"

2016-09-07 Thread Tom Lane
ke JSON definitely has lots to recommend it --- eg, it probably won't break when you find out your initial spec for the transport format was too simplistic. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Passing varchar parameter to INTERVAL

2016-09-07 Thread Tom Lane
other > users'); Hm? That would be passing a timestamp not an interval. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Privileges on public schema can't be revoked?

2016-09-06 Thread Tom Lane
didn't last I heard, I might be out of date.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Privileges on public schema can't be revoked?

2016-09-06 Thread Tom Lane
ct on his being a member of PUBLIC. IOW, revoke only revokes a previous matching grant, and there was no such grant in this case. What there was was a grant to PUBLIC; see the relevant bit in initdb.c: "GRANT CREATE, USAGE ON SCHEMA public TO PUBLIC;\n\n",

Re: [GENERAL] postgres question: Views with duplicate field names

2016-09-05 Thread Tom Lane
s, just like you can't do "create table foo (f1 int, f1 int)". They can be reading the same values, though. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Get date timestamp(3) without time zone column - PGSQL 9.5

2016-09-04 Thread Tom Lane
rt) in ('2016-08-10') > but it doesn't work.. I get 0 rows... what am I doing wrong? Are you sure you're not getting an error? The query is specifying fields in "tasks" but the FROM clause only lists "jobs". Either one of those two cast-to-date syntaxes should work, so y

Re: [GENERAL] error initializing the db

2016-09-02 Thread Tom Lane
817.GO1663%40alvh.no-ip.org#20150120161817.go1...@alvh.no-ip.org which would suggest that you're trying to build some fairly old PG version with some fairly new C compiler. Whether that's actually the case, well, you didn't give enough info to tell. regards, tom lane -- Sent via

Re: [GENERAL] RETURNS TABLE function returns nothingness

2016-09-02 Thread Tom Lane
RETURN, per se, has exactly zero impact on the number of rows produced; it just stops execution. I think you can say RETURNS RECORD with a few OUT parameters to get the effect you're looking for. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] PG_MODULE_MAGIC issue with small extension

2016-09-02 Thread Tom Lane
ly this is indicating a problem. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PG_MODULE_MAGIC issue with small extension

2016-09-02 Thread Tom Lane
ing > against an 8.* headers. Hm, where are you reading that? I forget when the requirement was added, but it's certainly never been dropped. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscriptio

Re: [GENERAL] Array element foreign keys

2016-09-01 Thread Tom Lane
s ago and nothing new has been submitted, I wouldn't hold my breath. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Tom Lane
ound that most other browsers don't present that message :-( regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] UUIDs & Clustered Indexes

2016-08-30 Thread Tom Lane
nd if so why? A plain old bigint column is smaller, cheaper to index, and the natural mechanism for generating it (ie a sequence) will tend to preserve ordering for free. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] a column definition list is required for functions returning "record"

2016-08-29 Thread Tom Lane
expand the "*". The column definition list is exactly a hack for telling it that. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Error Upgrade PostgreSQL 9.4 to 9.5 in Debian

2016-08-27 Thread Tom Lane
line. Those are getting taken as arguments, not quotes. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] a column definition list is required for functions returning "record"

2016-08-26 Thread Tom Lane
ds_games, words_moves AS > How would you recommend to fix my declaration problem please? I think you are looking for the RETURNS TABLE syntax. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Understanding Postgres Memory Usage

2016-08-26 Thread Tom Lane
ve with it or upgrade. Or I guess you could turn off enable_hashagg when using array_agg() plus GROUP BY, though you'd want to remember to undo that whenever you do upgrade. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Understanding Postgres Memory Usage

2016-08-25 Thread Tom Lane
a self-contained test case? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Understanding Postgres Memory Usage

2016-08-25 Thread Tom Lane
the postmaster with its stderr directed to a file, not to /dev/null.) That would provide a better clue about what's eating space. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Understanding Postgres Memory Usage

2016-08-25 Thread Tom Lane
more of the shared buffer arena. (If your shared_buffers settings is not somewhere near 100MB, then this theory breaks down.) It would be worth using plain old top to watch this process. We have enough experience with that to be pretty sure how to interpret its numbers: "RES minus SHR"

Re: [GENERAL] Understanding Postgres Memory Usage

2016-08-25 Thread Tom Lane
f the same query, repeated over and over, causes memory to continue to grow, I'd call it a leak (ie bug). If repeat executions consume no additional memory then it's probably intentional caching behavior. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] pg_hba.conf : bad entry for ADDRESS

2016-08-25 Thread Tom Lane
ould probably have helped you diagnose this. But I think the problem is that you're required to specify a netmask or masklen; so "127.0.0.1/32" not just "127.0.0.1". regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Permissions pg_dump / import

2016-08-22 Thread Tom Lane
urce. Or just ignore these errors. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Unique constraint on field inside composite type.

2016-08-22 Thread Tom Lane
> and that did not work, but it got me to thinking, so: You'd need additional parens around the whole thing, like create unique index on "user"(((google_user).email)); The UNIQUE-constraint syntax will never work, because per SQL standard such constraints can only name simple columns. But

Re: [GENERAL] endash not a graphic character?

2016-08-21 Thread Tom Lane
'm not sure if any of the subsequent work on the regex engine would make it any easier to fix than it seemed at the time. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.

Re: [GENERAL] Jsonb extraction very slow

2016-08-16 Thread Tom Lane
Jim Nasby <jim.na...@bluetreble.com> writes: > On 8/11/16 8:45 AM, Tom Lane wrote: >> What were you doing to "get ten keys out"? If those were ten separate >> JSON operators, they'd likely have done ten separate decompressions. >> You'd have saved somet

Re: [GENERAL] Jsonb extraction very slow

2016-08-11 Thread Tom Lane
single key. What were you doing to "get ten keys out"? If those were ten separate JSON operators, they'd likely have done ten separate decompressions. You'd have saved something by having the TOAST data already fetched into shared buffers, but it'd still hardly be free.

Re: [GENERAL] plpython.h not installed in 9.4

2016-08-10 Thread Tom Lane
of plpython transform modules. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Detecting if current transaction is modifying the database

2016-08-09 Thread Tom Lane
catalogs, which requires both an XID and WAL entries. The same goes for most database alterations, really. There are very limited cases where you can produce WAL without assigning an XID or vice versa, but I'm not sure it's worth your while to distinguish. regards, tom lane

Re: [GENERAL] Jsonb extraction very slow

2016-08-09 Thread Tom Lane
ce it's got the value available to look at. You could possibly alleviate some of the speed issue by storing the column uncompressed (see ALTER TABLE ... SET STORAGE EXTERNAL), but that would bloat your disk space requirements so I'm not really sure it'd be a win. regards

Re: [GENERAL] select array_remove(ARRAY[NULL,NULL,NULL],NULL); returns {} instead of {NULL,NULL,NULL}

2016-08-08 Thread Tom Lane
eaking, array_remove (and I think array_replace as well) implements "IS NOT DISTINCT FROM" semantics rather than "=" semantics. I dunno that we want to make the documentation use that wording though, it'd probably confuse more people than it helped.

Re: [GENERAL] Column order in multi column primary key

2016-08-08 Thread Tom Lane
static/indexes-multicolumn.html Having said that, I'm pretty skeptical of the notion of redefining what your PK is on performance grounds. With this definition, you'd allow two entries with the same work_session_id, if they chanced to have different customer_ids. Is that really OK?

Re: [GENERAL] select array_length(array_remove(ARRAY[NULL,NULL,NULL],NULL), 1); returns NULL instead of 0

2016-08-08 Thread Tom Lane
Alexander Farber <alexander.far...@gmail.com> writes: > Thank you, so should I maybe switch to cardinality then? Yeah, that should work. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscript

Re: [GENERAL] select array_length(array_remove(ARRAY[NULL,NULL,NULL],NULL), 1); returns NULL instead of 0

2016-08-08 Thread Tom Lane
sional in PG. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux

2016-08-08 Thread Tom Lane
ale, only the standard ASCII letters will be transformed by upper/lower. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] how to serialize insert followed by read(select) by different clients

2016-08-07 Thread Tom Lane
e a rather material omission of facts.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Should a DB vacuum use up a lot of space ?

2016-08-06 Thread Tom Lane
les individually and checkpoint after each one. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Detecting if current transaction is modifying the database

2016-08-05 Thread Tom Lane
s places, though I do not think they're exposed at the SQL level. > Another thing I should have mentioned is that I don't consider incrementing > a sequence to be a modification. Things might not work the way you want on that... regards, tom lane -- Sent via pgsql-

Re: [GENERAL] fun fact about temp tables

2016-08-05 Thread Tom Lane
Alex Ignatov <a.igna...@postgrespro.ru> writes: > On 05.08.2016 17:51, Tom Lane wrote: >> Sure. Just like it reserves space for ordinary tables right away, >> long before there's any need to push the data out of shared_buffers. >> Otherwise, you might find yourself havi

Re: [GENERAL] fun fact about temp tables

2016-08-05 Thread Tom Lane
suffer out-of-disk-space while flushing a buffer, that's what we'd risk. So we allocate the disk space before accepting the INSERT in the first place. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscript

Re: [GENERAL] fun fact about temp tables

2016-08-05 Thread Tom Lane
ight away, long before there's any need to push the data out of shared_buffers. Otherwise, you might find yourself having to throw an "out of disk space" error after having already committed the relevant INSERTs. regards, tom lane -- Sent via pgsql-general ma

Re: [GENERAL] connection file descriptors created with identical number after process fork on mac

2016-08-03 Thread Tom Lane
e fd. FD numbers are process-local in all flavors of Unix. The above only proves that all of these processes had FDs 0..12 open already, which doesn't seem terribly surprising. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Problem with partitioning

2016-08-03 Thread Tom Lane
nt_table itself, but not on updates to rows in the child tables. To get that effect, attach the same trigger procedure to all the children. Don't recall offhand what the rules are for per-statement triggers. regards, tom lane -- Sent via pgsql-general mailing list

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Tom Lane
for Windows; there may not be any version that works well. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Re: Query planner using hash join when merge join seems orders of magnitude faster

2016-08-01 Thread Tom Lane
early-stop is happening or not. It'd manifest as one join input node showing an actual number of rows returned that's less than you'd expect. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www

Re: [GENERAL] Force pg_hba.conf user with LDAP

2016-08-01 Thread Tom Lane
sults, but it's doable.) The main benefit of approaching things this way is it doesn't have to be all-or-nothing: the gating function can apply checks on what it will allow. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Proposal "stack trace" like debugging option in PostgreSQL

2016-07-31 Thread Tom Lane
CT ifoo($1,$2)" PL/pgSQL function ifoo2(integer,text) line 1 at PERFORM STATEMENT: select ifoo2(1,'foo'); regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Proposal "stack trace" like debugging option in PostgreSQL

2016-07-31 Thread Tom Lane
error messages give you that already? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] 9.6beta3

2016-07-29 Thread Tom Lane
ve had to do an initdb or pg_upgrade for the new version anyway because of other catalog changes. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Multiple NOTIFY is ignored

2016-07-28 Thread Tom Lane
ication "foo" with payload "0|DELETE|A|" received from server process with PID 19442. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Server side backend permanent session memory usage ?

2016-07-27 Thread Tom Lane
36 https://git.postgresql.org/gitweb/?p=postgresql.git=commitdiff=1d2fe56e4 We did not back-patch those changes because they seemed rather invasive/risky compared to the value for average users. If you still see misbehavior in 9.6, it'd be worth trying to extract a self-contained example.

Re: [GENERAL] How to give complete ownership of a new DB to a new user (non-SU)?

2016-07-27 Thread Tom Lane
WNED takes most of the drudgery out of it, if you have the template database set up properly. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Weirdness with the stats collector process

2016-07-26 Thread Tom Lane
hen PG wasn't running, but it was pretty foolish to do it to a running system without even looking to see if any IPV6 connections were open :-( regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] question on parsing postgres sql queries

2016-07-26 Thread Tom Lane
ruct belong to the SELECT or the IN. It might be nice to have some sort of tool that could check compatibility of the doc synopses with the actual grammar. But I doubt that trying to auto-generate either one from the other would be a win. regards, tom lane -- Sent via pgsql-ge

Re: [GENERAL] Weirdness with the stats collector process

2016-07-25 Thread Tom Lane
atistics collector is doing? strace? You could at least confirm whether it's receiving anything. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] A simple extension immitating pg_notify

2016-07-24 Thread Tom Lane
if and only if the sending transaction commits. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] A simple extension immitating pg_notify

2016-07-24 Thread Tom Lane
sible to have clean semantics for failures: the sending transaction would have committed all right, but some of the recipients wouldn't get the notification. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

Re: [GENERAL] gin index operator class functions in sql?

2016-07-21 Thread Tom Lane
Andrew Geery <andrew.ge...@gmail.com> writes: > Is it possible to define functions in SQL (as opposed to C) to do the same > thing -- create an operator class -- for a gin index? Afraid not; several of those APIs are C-specific. regards, tom lane -- Se

Re: [GENERAL] 9.5: pg_stat_statement and pgbench execution time discrepancies

2016-07-21 Thread Tom Lane
urprises you. pg_stat_statements only measures the executor runtime, omitting parse/plan times as well as network transmission times. pgbench is reporting the overall time as seen from the client side. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] pg_dump without any SET command in header of output plain text sql file

2016-07-20 Thread Tom Lane
Alex Ignatov <a.igna...@postgrespro.ru> writes: > Is there any way to make pg_dump(9.5) to dump table (with data) without > any SET command in the header of output plain sql file? No, but if all you want is the table data in a file, why not just use COPY?

Re: [GENERAL] Multiple clusters with same tablespace location

2016-07-20 Thread Tom Lane
ifferent locations. When setting up new slave instances, pg_basebackup's --tablespace-mapping option would help you with that. For an existing slave instance, you'd need to shut it down while manually moving the tablespace directory(s) and re-pointing the symlink(s). regards, t

Re: [GENERAL] Is it possible to control the location of the lock file when starting postgres?

2016-07-19 Thread Tom Lane
rever you choose to put the socket) as the host location. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Constraint using a SQL function executed during SELECT

2016-07-19 Thread Tom Lane
are obvious showstoppers like a FROM clause. This wouldn't constitute a general solution to your problem, of course, but it would save some useless cycles in planning. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Recovering data from an old disk image

2016-07-15 Thread Tom Lane
alls of 9.4beta1 on our webservers, but in any case you could easily check out that tag from our git server to recover the matching source code. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:/

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Tom Lane
which is what "--quote-all-identifiers" was invented to address. But if you don't use that option, you're at risk for that regardless of whether you dumped with the older or new pg_dump. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] pg_restore out of memory

2016-07-15 Thread Tom Lane
I suppose log_statement to 'all' is no longer necessary? I agree; we already know which statement is failing. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Trouble starting Postgresql after an upgrade

2016-07-14 Thread Tom Lane
ake the problem more interesting, I can bring the DB engine up if I use > pg_ctl … but only if I’m in the data dir. Possibly you have "data_directory = ." or something like that in the config file? regards, tom lane -- Sent via pgsql-general mailing l

Re: [GENERAL] Server side backend permanent session memory usage ?

2016-07-14 Thread Tom Lane
ster in such a way that that gets captured to a log file rather than sent to /dev/null). Save that. Wait until you see bloat, reattach and repeat, compare the memory maps. Let us know what you see. If possible, compare maps taken at points where the session is idle and waiting for input.

Re: [GENERAL] pg_restore out of memory

2016-07-13 Thread Tom Lane
cross a network --- and if the latter, how fast is the network? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] postgresql "init script" for postgres 9.2.15

2016-07-13 Thread Tom Lane
e whatever changes you have to in the scripts you already have. You may spend more time dealing with useless-to-you changes than you save by not doing your own research on what changed in Postgres. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] pg_restore out of memory

2016-07-13 Thread Tom Lane
s are being issued to the pg_restore session? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PostgreSQL FDW + Trigger on Remote DB = WARNING: there is no transaction in progress

2016-07-12 Thread Tom Lane
think you'll have to give a complete example for anyone to diagnose it. Also, what PG versions are in use exactly, both local and remote? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://

Re: [GENERAL] pg_restore out of memory

2016-07-12 Thread Tom Lane
ent = all so that it's clear what is being worked on when the error happens. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] pg_restore out of memory

2016-07-12 Thread Tom Lane
Miguel Ramos <org.postgre...@miguel.ramos.name> writes: > Às 15:40 de 12-07-2016, Tom Lane escreveu: >> Unless you're running pg_restore under a really small ulimit, this would >> seem to suggest some kind of memory leak in pg_restore itself. I wonder >> how many obj

Re: [GENERAL] Upsert with a partial unique index constraint violation

2016-07-12 Thread Tom Lane
, I'm all ears. > That should work. Are you sure you haven't spelled it "... WHERE d IS TRUE"? It does work for me, but I think it probably only started working after this as-yet-unreleased patch: Author: Tom Lane <t...@sss.pgh.pa.us> Branch: master [26e66184d] 2016-05-11 16:2

Re: [GENERAL] pg_restore out of memory

2016-07-12 Thread Tom Lane
8 custom compiled to get 32kB blocks 9.1.8 is pretty old ... regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Question about antijoin

2016-07-12 Thread Tom Lane
selectivity calculations, but we leave it to * distribute_qual_to_rels to get rid of such clauses. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Slow SQL?

2016-07-12 Thread Tom Lane
subselects seem to be pretty expensive. If you don't want to rewrite the query in a wholesale fashion like he suggests, you might be able to make the MAX's cheaper by providing an index on sed_uttak(avlsnr, dato); but I'm not sure how much that will help. regards, tom lane

Re: [GENERAL] error when upgrading 9.4 to 9.5 manually

2016-07-10 Thread Tom Lane
ion not supported by this evidence; we can't tell whether the postmaster started at all. Did you look into pg_upgrade_server.log as suggested? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] error when upgrading 9.4 to 9.5 manually

2016-07-10 Thread Tom Lane
with postgres off: > $ pg_upgrade -b /usr/lib64/pgsql/postgresql-9.4/bin -B /usr/bin -d > /db/pgsql/data.old -D /db/pgsql/data Why are you not using "postgresql-setup upgrade", as documented in /usr/share/doc/postgresql-NNN/README.rpm-dist ? regards, tom lane -- S

Re: [GENERAL] Pgadmin access to Postgresql

2016-07-09 Thread Tom Lane
for local TCP connections not remote ones. You typically want listen_addresses set to "*" if you intend to allow remote connections. When you start getting complaints phrased along the lines of "no pg_hba.conf entry" then it'll be time to fix pg_hba.conf.

Re: [GENERAL] pasting a lot of commands to psql

2016-07-08 Thread Tom Lane
ttedly, maybe there's not a lot of usability gain there.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] pasting a lot of commands to psql

2016-07-07 Thread Tom Lane
Alvaro Herrera <alvhe...@2ndquadrant.com> writes: > Tom Lane wrote: >> You might have better luck with "psql -n", or maybe not. > I've wished sometimes for a "\set READLINE off" psql metacommand for > this kind of thing. It's pretty annoying w

Re: [GENERAL] pasting a lot of commands to psql

2016-07-07 Thread Tom Lane
quot;psql -n", or maybe not. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Fastest memmove in C

2016-07-07 Thread Tom Lane
replacements for libc routines. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Possible to create canonicalized range type without being superuser?

2016-07-05 Thread Tom Lane
cted, in which you might store values that aren't canonical. I have some recollection that we discussed this when range types were being invented, and didn't think of any nice solution. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] 9.6 Beta 2 Performance Regression on Recursive CTE

2016-07-05 Thread Tom Lane
g is a bad guess about the size of the recursive union result, which is unsurprising since it is only a guess. If you've heard of ways to estimate recursive union sizes more plausibly, maybe we could do something about that. regards, tom lane -- Sent via pgsql-general mailing lis

Re: [GENERAL] Avoid deadlocks on alter table

2016-07-05 Thread Tom Lane
FKs one at a time, rather than all in one transaction. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Update multiple rows in a table with different values

2016-07-01 Thread Tom Lane
nt I am just trying to explain the algorithm. > I do not know the exact syntax. You would need to write a plpgsql function in order to have a loop like that; there's no loops in bare SQL. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgr

Re: [GENERAL] table name size

2016-07-01 Thread Tom Lane
ignment considerations mean that the odd byte would just be wasted in most or all of the catalogs. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PostgreSQL 9.5 and PL/Ruby install problem(Centos 6 64 bit)

2016-06-30 Thread Tom Lane
tion, for quite a long time. AFAICS this error would only be possible if plruby had been compiled against postgres header files from 9.0 or before, which would be a packaging mistake. Suggest complaining to whoever the package builder is. regards, tom lane -- Sent vi

Re: [GENERAL] cache lookup failed for index

2016-06-29 Thread Tom Lane
of the backend functions it calls can tell, and they throw errors. There are various ways this might be rejiggered, but none of them entirely remove all risk of failure in the presence of concurrent DDL. Personally I'd recommend just retrying the pg_dump until it succeeds. re

<    2   3   4   5   6   7   8   9   10   11   >