Re: [GENERAL] deadlock error - version 8.4 on CentOS 6

2016-10-28 Thread Tom Lane
l lock on t_unit, which is blocking whatever the "update t_unit_status_log" command wants to do with t_unit. Looks like a classic lock-strength-upgrade mistake to me. 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] deadlock error - version 8.4 on CentOS 6

2016-10-28 Thread Tom Lane
adlock error, there should be more information about it in the postmaster log. 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] libpq heartbeat

2016-10-27 Thread Tom Lane
ttps://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS 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] The consequenses of interrupted vacuum

2016-10-27 Thread Tom Lane
fix. It's probably making some progress but not much. You need to fix 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] What is the 'data2' directory for?

2016-10-25 Thread Tom Lane
tself certainly does no such thing. Maybe it's being done in some wrapper script you're using? 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] Errors while installing PostGIS by an unusual method

2016-10-24 Thread Tom Lane
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] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-23 Thread Tom Lane
. 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] checkpoint write errors ( getting worse )

2016-10-22 Thread Tom Lane
the whole, though, it's starting to sound like that system has got major problems. You'd be well advised to focus all your efforts on getting a valid dump, not bringing it back into production. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] checkpoint write errors

2016-10-21 Thread Tom Lane
REINDEX on whatever table equates to > "base/1029860192/1029863651"? If so how do I determine the db and table > for "base/1029860192/1029863651"? 1029860192 is the OID of the database's pg_database row. 1029863651 is the relfilenode in the relation's pg_class row.

Re: [GENERAL] Cannot delete role because it depends on "default privileges"

2016-10-21 Thread Tom Lane
efault privileges that exist in the *current* database. You need to do DROP OWNED BY in that database (and maybe other ones, but start there). regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.p

Re: [GENERAL] Cannot delete role because it depends on "default privileges"

2016-10-21 Thread Tom Lane
ped because some objects depend on it > DETAIL: privileges for default privileges on new types belonging to role > role_main See DROP OWNED BY. https://www.postgresql.org/docs/9.6/static/role-removal.html regards, tom lane -- Sent via pgsql-general mailing list (

Re: [GENERAL] make PostgreSQL with TCLSH: No rule to make target

2016-10-20 Thread Tom Lane
tallation. Or maybe the bad value for TCLSH is somehow causing this, though I'm not sure how. 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] configure PostgreSQL with the python: distutils module not found

2016-10-20 Thread Tom Lane
ble Python. Looking into config.log to see what the stderr output of this test was might be informative. 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] configure PostgreSQL with PERL: Perl version 5.8 or later is required, but this is .

2016-10-20 Thread Tom Lane
generated.) > configure: error: Perl not found > Why does it say, "Perl version 5.8 or later is required, but this is ."? It's trying to extract the Perl version number from the output of "perl -v", and evidently failing to find one. What does "perl -v" pri

Re: [GENERAL] Drop user cascade

2016-10-19 Thread Tom Lane
other databases. See https://www.postgresql.org/docs/9.6/static/role-removal.html 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] tablesample performance

2016-10-18 Thread Tom Lane
Simon Riggs <si...@2ndquadrant.com> writes: > On 18 October 2016 at 19:34, Tom Lane <t...@sss.pgh.pa.us> wrote: >> If you don't want to have an implicit bias towards earlier blocks, >> I don't think that either standard tablesample method is really what >

Re: [GENERAL] tablesample performance

2016-10-18 Thread Tom Lane
the rows it grabs will be consecutive. 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] Getting the currently used sequence for a SERIAL column

2016-10-18 Thread Tom Lane
Thomas Kellerer <spam_ea...@gmx.net> writes: > Tom Lane schrieb am 18.10.2016 um 15:20: >> Personally, I'd try looking in pg_depend to see if the column's default >> expression has a dependency on a relation of type sequence. That avoids >> all the fun of parsi

Re: [GENERAL] Getting the currently used sequence for a SERIAL column

2016-10-18 Thread Tom Lane
> parser of our own will do? Googling found no candidates. Personally, I'd try looking in pg_depend to see if the column's default expression has a dependency on a relation of type sequence. That avoids all the fun of parsing the expression and turns it into a simple SQL join problem.

Re: [GENERAL] custom average window function failure

2016-10-15 Thread Tom Lane
Sebastian Luque <splu...@gmail.com> writes: > Tom Lane <t...@sss.pgh.pa.us> wrote: >> Are you in a position to apply patches? It's a one-line fix: >> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=dca25c2562199ce1e7e26367613912a8eadbbde8 > I'd

Re: [GENERAL] could not connect to server

2016-10-15 Thread Tom Lane
g file might offer some insight as to why the server's not running. 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] "The index is not optimal" GiST warnings

2016-10-13 Thread Tom Lane
aster, and I'd tend to believe that over any other evidence. 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] Passing of where clause to remote table in FDW

2016-10-13 Thread Tom Lane
execution. Use the || operator instead. 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] LOG: munmap(0x7fff80000000) failed: Invalid argument

2016-10-11 Thread Tom Lane
e size, but I've not heard that mmap() might succeed and then munmap() fail. That seems like what's happening to you 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] confusion about user paring with pg_hba and pg_ident

2016-10-11 Thread Tom Lane
s to specify that it wants to log in as mailman, and likewise mattermost needs to specify mmuser. If it's not practical to make the client applications send non-default user names, you'll need to rename the Postgres roles to match the external user names. regards, tom lane

Re: [GENERAL] Create recursive view schema.name

2016-10-11 Thread Tom Lane
licit about the fact that the implied CTE just has the base name of the view; but since CTE names can't be qualified, that's not that hard to guess. Short answer is that you don't qualify the view's internal self-reference, even if you are using a schema name in the CREATE.

Re: [GENERAL] LOG: munmap(0x7fff80000000) failed: Invalid argument

2016-10-10 Thread Tom Lane
Andres Freund <and...@anarazel.de> writes: > On 2016-10-10 18:21:48 -0400, Tom Lane wrote: >> Chris Richards <ch...@infinite.io> writes: >>> LOG: munmap(0x7fff8000) failed: Invalid argument >> [ digs in code... ] One theory is that PGSharedMemoryDetach

Re: [GENERAL] LOG: munmap(0x7fff80000000) failed: Invalid argument

2016-10-10 Thread Tom Lane
sely? What nondefault settings have you got in postgresql.conf? 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: [SPAM] [GENERAL] psql 9.3 automatic recovery in progress

2016-10-10 Thread Tom Lane
if the postmaster weren't already expecting the children to die, it would have reacted differently. 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] psql 9.3 automatic recovery in progress

2016-10-10 Thread Tom Lane
anything but Postgres. 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] psql 9.3 automatic recovery in progress

2016-10-10 Thread Tom Lane
e Linux OOM killer has decided to target some database process. You need to do something to reduce memory pressure and/or disable memory overcommit so that that doesn't happen. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To ma

Re: [GENERAL] custom average window function failure

2016-10-09 Thread Tom Lane
"Sebastian P. Luque" <splu...@gmail.com> writes: > Tom Lane <t...@sss.pgh.pa.us> wrote: >> On closer inspection, the error is only in the >> aggregate-used-as-window-function case, not plain aggregation. > Yes, I see the same phenomenon. Could someone su

Re: [GENERAL] custom average window function failure

2016-10-09 Thread Tom Lane
Adrian Klaver <adrian.kla...@aklaver.com> writes: > On 10/09/2016 08:46 AM, Tom Lane wrote: >> Clearly a bug --- the wrong type OIDs are being passed down to >> array_append. It should be told that it's getting called as > For my edification, why does this work?: On clos

Re: [GENERAL] custom average window function failure

2016-10-09 Thread Tom Lane
de in the aggregate/windowfunction area. Possibly me :-(. Haven't found exactly where things are going off the rails, but it's clearly a PG bug. Thanks for the report! regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] Libpq functions & string to obtain connection parameters

2016-10-07 Thread Tom Lane
g in the community git repo. 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] Transactional-DDL DROP/CREATE TABLE

2016-10-06 Thread Tom Lane
ere the table doesn't exist. Is there more DDL going on that you have not shown us? regards, tom lane [1] at least, since PG 9.2 or thereabouts. -- 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] BRIN indexes and ORDER BY

2016-10-05 Thread Tom Lane
Alvaro Herrera <alvhe...@2ndquadrant.com> writes: > Darren Lafreniere wrote: >> We found a pgsql-hackers thread from about a year ago about optimizing >> ORDER BY for BRIN indexes. Tom Lane suggested that he was working on it: >> https://www.postgresql.org/

Re: [GENERAL] Problems with pg_upgrade after change of unix user running db.

2016-10-03 Thread Tom Lane
rns out to be, it might be something we choose to fix only in HEAD. 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 “max_wal_size” and “min_wal_size” parameters default values from postgresql.conf file

2016-10-03 Thread Tom Lane
Num. It should be showing you something like "16MB" in the unit column, I think. 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] Problems with pg_upgrade after change of unix user running db.

2016-10-03 Thread Tom Lane
g_constraint WHERE conrelid = 'js_activity_20110101'::regclass; and likewise for the parent table. 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] Problems with pg_upgrade after change of unix user running db.

2016-10-03 Thread Tom Lane
Benedikt Grundmann <bgrundm...@janestreet.com> writes: > On 3 October 2016 at 14:12, Tom Lane <t...@sss.pgh.pa.us> wrote: >> You're going to need to manually drop that operator from the source >> database, as "=>" isn't a legal operator name anymore. This a

Re: [GENERAL] Problems with pg_upgrade after change of unix user running db.

2016-10-03 Thread Tom Lane
e going to need to manually drop that operator from the source database, as "=>" isn't a legal operator name anymore. This appears to be left over from a pre-9.0 version of hstore. 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] pgadmin vs psql output

2016-09-30 Thread Tom Lane
001" > Output in psql > > \x4130303030303030303030303030303030303030303030303030303030303031 > is there some setting in psql output I need to take care of. See "bytea_output" parameter. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] System crashed: fatal error restarting postgres

2016-09-30 Thread Tom Lane
Rich Shepard <rshep...@appl-ecosys.com> writes: > On Fri, 30 Sep 2016, Tom Lane wrote: >> Wrong permissions on /dev/shm, perhaps? >Yes. I keep forgetting about this since I don't reboot this > server/workstation often. You ought to do some investigation and figur

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread Tom Lane
David Rowley <david.row...@2ndquadrant.com> writes: > On 1 October 2016 at 05:47, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Somebody will need to trace through this on Windows and see where it's >> going off the rails. > I tried the test case on 9.6.0 on a Windows 8.

Re: [GENERAL] System crashed: fatal error restarting postgres

2016-09-30 Thread Tom Lane
e asking yourself is why you're running *any* java application with root privileges, which is what I think would be needed to let this happen. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: htt

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread Tom Lane
looks platform dependent. Somebody will need to trace through this on Windows and see where it's going off the rails. 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: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Tom Lane
s just going to do pg_fatal anyway. We should rewrite these functions to just error out internally, which will make it much easier to provide decent error reporting indicating which call failed. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Tom Lane
sn't garbage? 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] lost synchronization with server: got message type "Z"

2016-09-29 Thread Tom Lane
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] Сreate parallel aggregate

2016-09-29 Thread Tom Lane
bly that won't fly. 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] Database fixed size

2016-09-28 Thread Tom Lane
happy if it runs out of WAL space. Hitting a limit on table size per se behaves a bit more sanely, though even there you can get into trouble --- for instance, in some situations VACUUM will try to allocate additional disk space, making recovery harder. regards, tom lane -

Re: [HACKERS] Re: [GENERAL] inconsistent behaviour of set-returning functions in sub-query with random()

2016-09-27 Thread Tom Lane
Tom van Tilburg <tom.van.tilb...@gmail.com> writes: > Good to know and I agree that it is not an urgent case. > I think this practice might be more common in the POSTGIS community where > there are plenty of set-returning-functions used in this way. My use was > taki

Re: [GENERAL] lost synchronization with server: got message type "Z"

2016-09-27 Thread Tom Lane
client side? The most recent related bugfix I can find in the 9.2 commit history was in libpq, and it came out in 9.2.8. 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] inconsistent behaviour of set-returning functions in sub-query with random()

2016-09-27 Thread Tom van Tilburg
at stackexchange. thanks, Tom On Mon, 26 Sep 2016 at 21:38 Tom Lane <t...@sss.pgh.pa.us> wrote: > Tom van Tilburg <tom.van.tilb...@gmail.com> writes: > > I'm often using the WHERE clause random() > 0.5 to pick a random subset > of > > my data. Now I noticed that wh

Re: [GENERAL] inconsistent behaviour of set-returning functions in sub-query with random()

2016-09-26 Thread Tom Lane
Tom van Tilburg <tom.van.tilb...@gmail.com> writes: > I'm often using the WHERE clause random() > 0.5 to pick a random subset of > my data. Now I noticed that when using a set-returning function in a > sub-query, I either get the whole set or none (meaning that the WHERE >

[GENERAL] inconsistent behaviour of set-returning functions in sub-query with random()

2016-09-26 Thread Tom van Tilburg
nother function to test apart from random(), but likely there is some - I tested with generate_series and as well - My real use case works with postgis and pgpointcloud where a range of set-returning functions is used in this manner Thanks, Tom

Re: [GENERAL] Chante domain type - Postgres 9.2

2016-09-26 Thread Tom Lane
size. The latter is a PostgreSQL extension." > Does that trick remove the overhead (length check) Tom mentioned upstream? Partly. It should get rid of actual calls to the varchar length checking function. There's still some distributed overhead arising from the fact that text, not varchar, is

Re: [GENERAL] Stats update difference between VACUUM ANALYZE and ANALYZE in 9.2?

2016-09-26 Thread Tom Lane
ALYZE'ing the partition parent tables in your first pass, but I'm betting on the all-visible fractions as being the issue. 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] Chante domain type - Postgres 9.2

2016-09-26 Thread Tom Lane
etter be one that you can trace to crystal-clear application requirements. varchar(n) where n has been plucked from the air is a good sign of bad database design. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make cha

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Tom Lane
literals. 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] Unstable C Function

2016-09-22 Thread Tom Lane
oroutine situation. 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] Unstable C Function

2016-09-22 Thread Tom Lane
Ian Campbell <ianr...@gmail.com> writes: > Thanks for personally replying, Tom. I appreciate it. > You are correct. In the interim, I found the following change solved the > issue: > SPI_finish(); // move to here > SRF_RETURN_DONE(funcctx); That might work under light u

Re: [GENERAL] Unstable C Function

2016-09-21 Thread Tom Lane
that way. There are some other things I could criticize here, like labeling the function IMMUTABLE when its results depend on table contents, but they probably aren't causing your crashes. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] performance problems with bulk inserts/updates on tsrange with gist-based exclude constrains

2016-09-16 Thread Tom Lane
he GiST range opclass, but I would not be surprised if having lots of those is pretty destructive to the index's ability to be selective about && searches. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to yo

Re: [GENERAL] ERROR: could not read block 4 ...

2016-09-15 Thread Tom Lane
ould drop template0 and re-create it from template1. Otherwise, pg_dumpall/initdb/reload would seem to be called for. A cautious person might want to do the latter anyway in case there's more problems than just this one. regards, tom lane -- Sent via pgsql-general mailing li

Re: [GENERAL] Request to share information regarding postgresql pg_xlog file.

2016-09-15 Thread Tom Lane
point, that will take quite a while, so it's a last resort ... but it ought to work. 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] Maximum number of exclusive locks

2016-09-13 Thread Tom Lane
Jeff Janes <jeff.ja...@gmail.com> writes: > On Tue, Sep 13, 2016 at 6:21 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Having said that, the amount of slop involved is only enough for a >> few hundred lock entries. Not sure how you're managing to get to >> nearly

Re: [GENERAL] Maximum number of exclusive locks

2016-09-13 Thread Tom Lane
any other shared structures that grow at runtime. So there's room for the lock table to grow a bit beyond its nominal capacity. Having said that, the amount of slop involved is only enough for a few hundred lock entries. Not sure how you're managing to get to nearly 2 extra entries.

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

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