Re: [GENERAL] How to store multiple rows in array .

2017-11-19 Thread Tom Lane
tems$inv_lines_rt composite type, that type is what determines the column names. 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] parallel query in 9.6.6 + oracle_fdw -> ERROR: invalid cache ID: 41

2017-11-19 Thread Tom Lane
d, for example. (I'd bet that adding oracle_fdw to shared_preload_libraries would fail badly, though perhaps not with this exact error message.) So I'd call this an oracle_fdw bug. It needs to postpone what it's doing here to the first normal FDW function call in a session.

Re: [GENERAL] How to store multiple rows in array .

2017-11-19 Thread Tom Lane
, declare myarray rowtypename[]; ... select array(select row(col1, ...)::rowtypename from ...) into myarray; regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postg

Re: [GENERAL] postmaster deadlock while logging after syslogger exited

2017-11-16 Thread Tom Lane
.. Hm, so that's another angle David didn't report on: is it possible that his workload could have resulted in a very large volume of incomplete in-progress log messages? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] postmaster deadlock while logging after syslogger exited

2017-11-16 Thread Tom Lane
Andres Freund writes: > On 2017-11-16 21:39:49 -0500, Tom Lane wrote: >> What might be worth thinking about is allowing the syslogger process to >> inherit the postmaster's OOM-kill-proofness setting, instead of dropping >> down to the same vulnerability as the postmast

Re: [GENERAL] postmaster deadlock while logging after syslogger exited

2017-11-16 Thread Tom Lane
Andres Freund writes: > On 2017-11-06 15:35:03 -0500, Tom Lane wrote: >> David Pacheco writes: >>> I ran into what appears to be a deadlock in the logging subsystem. It >>> looks like what happened was that the syslogger process exited because it >>>

Re: [GENERAL] pg 10 crashes on int8_avg_combine

2017-11-14 Thread Tom Lane
iscussed at https://www.postgresql.org/message-id/flat/20171110185747.31519.28038%40wrigleys.postgresql.org 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] missing public on schema public

2017-11-14 Thread Tom Lane
erent results. Stephen, you put some filtering logic in the wrong place in pg_dump. 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] Retrieve the server's time zone

2017-11-14 Thread Tom Lane
7;t want to change it, you could try select reset_val from pg_settings where name = 'TimeZone'; 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 walsender process doesn't exist after "pg_ctl stop -m fast"

2017-11-13 Thread Tom Lane
l reproduce it on current 9.6. 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] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Tom Lane
ant to just raise the timeout, I could get behind a more thorough rethinking of the behavior 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] Multiple unnests in query

2017-11-12 Thread Tom Lane
our first. It has only one SRF in the SELECT list, so there's not much doubt about what ought to happen. 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] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Tom Lane
g need to change that default, but if you have a surrounding script that is going to take adverse action after a timeout then you need to use a larger value ... regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscr

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-12 Thread Tom Lane
ut. Agreed, but I think Peter has a point: why is there a timeout at all, let alone one as short as 30 seconds? Since systemd doesn't serialize service starts unnecessarily, there seems little value in giving up quickly. And we know that cases such as crash recovery may take more than that.

Re: [GENERAL] Difference between CAST(v AS t) and v::t

2017-11-11 Thread Tom Lane
province of the typecast docs to explain the weirdnesses of index syntax. 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] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Tom Lane
> http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main > I was assuming someone in the Postgres project was involved in > packaging it. Do you know who I should reach out to in that case? Christoph's probably a good place to start. regards, tom lane -- Sen

Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Tom Lane
ted on signal [SIGTERM] ... pg_ctl itself wouldn't decide to forcibly shut down the server if the timeout expired. It merely stops waiting and tells you so. It seems like this must represent misdesign of whatever start script you're using. I think you need to complain to the Debian packager

Re: [GENERAL] OpeSSL - PostgreSQL

2017-11-09 Thread Tom Lane
x27;s a postmaster-wide setting; there is not a provision for letting it be set per-user. Since the SSL handshake necessarily occurs before we find out which user is trying to connect, it'd be hard to do differently. regards, tom lane -- Sent via pgsql-general

Re: [GENERAL] Index not used when using expression

2017-11-09 Thread Tom Lane
ou is that the query is not testing packettime, it's testing packettime::float8, because date_part() returns float8. You could cast the result of date_part() to bigint, or whatever type the packettime column actually is, so that the comparison is to the unadorned variable.

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-08 Thread Tom Lane
ve side > effects to that? Well, it's imprecise. Most people don't like that when it comes to monetary amounts. 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] Block duplications in a shared buffers

2017-11-07 Thread Tom Lane
ing key. relfilenode isn't guaranteed unique across directories. The fork number can matter, too. 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] idle in transaction, why

2017-11-06 Thread Tom Lane
tion timeout' in the existing PG sources (and I sure hope no committer would have thought that such an ambiguous message text was satisfactory). So I think your error is coming from client-side or third-party code. What other moving parts have you got in there? regards, to

Re: [GENERAL] postmaster deadlock while logging after syslogger exited

2017-11-06 Thread Tom Lane
when the process > exited.) Could we see the exact log message(s) involved? It's pretty hard to believe that the logger would have consumed much memory. 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] idle in transaction, why

2017-11-06 Thread Tom Lane
ave to guess about the latter: the pg_settings view will tell you exactly where the active value came from. See the source, sourcefile, sourceline columns. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] Naming conventions for column names

2017-11-06 Thread Tom Lane
hink about the confusion factor of having different naming styles in different places. 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] xmin increasing within a transaction block?

2017-11-06 Thread Tom Lane
example doesn't show > any. Or maybe you have event triggers. I can reproduce the example if I "\set ON_ERROR_ROLLBACK on" in psql. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] Runtime analysis

2017-11-05 Thread Tom Lane
ocket servers, NUMA effects across sockets can be a big headache too. 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] EXPLAIN command just hangs...

2017-11-04 Thread Tom Lane
execution and see where I am at then. Well, that's pretty interesting in itself. Any chance of attaching to one of those unkillable backends with gdb and getting a stack trace? https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend regards, to

Re: [GENERAL] Adding 'serial' to existing column

2017-11-03 Thread Tom Lane
;tab_id_seq" does not exist > LINE 1: ...OLUMN table_id SET DEFAULT nextval('||quote_ident(tab_id_seq... You want quote_literal, not quote_ident, because you're trying to produce a single-quoted literal. regards, tom lane -- Sent via pgsql-general m

Re: [GENERAL] EXPLAIN command just hangs...

2017-11-02 Thread Tom Lane
nner having trouble trying to determine the extreme values of an indexed column, in cases where there are a lot of uncommitted or recently-dead entries at the end of the index --- it does a lot of work trying to verify the commit status of each entry in turn. So I wonder if that might apply.

Re: [GENERAL] Building tds_fdw Extension for Windows 64bit

2017-11-02 Thread Tom Lane
;t help you more than 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] Building tds_fdw Extension for Windows 64bit

2017-11-02 Thread Tom Lane
nd this see https://www.postgresql.org/message-id/flat/A737B7A37273E048B164557ADEF4A58B539300BD%40ntex2010a.host.magwien.gv.at 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 bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Tom Lane
ne deletion of the system catalog entries for the toast table as well. I'm not likely to work on this idea myself in the near future, but if anyone else is feeling motivated to attack the problem, have at it ... regards, tom lane -- Sent via pgsql-general mailing list

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Tom Lane
o long and has only been reported a couple of times is the main reason why I'm loath to take a brute force duplicate-the-data approach to fixing it. Such a fix would penalize many more people than it would help. regards, tom lane -- Sent via pgsql-general mailing list

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Tom Lane
fix it at some point, but the sticking point is how to cover this corner case without causing a performance drop for normal cases. In the meantime, maybe you could make the temp tables be ON COMMIT DROP instead of dropping them explicitly mid-transaction. regards, tom lane

Re: [GENERAL] the database system is shutting down - terminating walsender process due to replication timeout

2017-11-01 Thread Tom Lane
t; down. It seems that walsender process was preventing the shutdown of the > master database - until timeout was reached, a behavior we didn't experience > before. 9.6.what? There were several possibly-relevant bug fixes in 9.6.3 and 9.6.4, notably this one: Author: Tom Lane Bran

Re: [GENERAL] Make "(composite).function_name" syntax work without search_path changes?

2017-10-30 Thread Tom Lane
de from the difficulty of documenting it clearly, that seems like a great recipe for security hazards. 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 syntax change

2017-10-30 Thread Tom Lane
he multi-column > syntax if you're only updating a single column. Was this intentional? You still can, but you have to write ROW() explicitly. This conforms to the standard, which our old behavior didn't. It was probably an oversight not to list this change as a compatibility i

Re: [GENERAL] gin index trouble

2017-10-30 Thread Tom Lane
; if it did regenerate the problem. It's possible you could duplicate the failure with synthetic data generated by a not-very-long script. That would beat uploading a large data file, not to mention possibly needing to sanitize your data. regards, tom lane -- Sent

Re: [GENERAL] gin index trouble

2017-10-30 Thread Tom Lane
mediately see anything broken about this definition, so it seems like it should've worked. 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] starting PG command line options vs postgresql.con

2017-10-30 Thread Tom Lane
only matters if you're running multiple postmasters). Otherwise it's better to leave as much as you can to 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: [GENERAL] query not scaling

2017-10-26 Thread Tom Lane
ther inlining has happened.) 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 do I insert and update into a table of arrays of composite types via a select command?

2017-10-25 Thread Tom Lane
umn of a composite type, you probably don't need all that notation anyway --- seems like array[data_comp::my_type] or array[data_comp]::my_type[] 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] How do I insert and update into a table of arrays of composite types via a select command?

2017-10-25 Thread Tom Lane
27;c')::mytype,row('d','e','f')::mytype]; INSERT 0 1 or just cast the whole ARRAY[] construct: regression=# insert into t_array select array[row('a','b','c'),row('d','e','f')]::mytype[]; INSERT 0 1 alt

Re: [GENERAL] Two versions of an extension in the same cluster?

2017-10-23 Thread Tom Lane
es where you really need to do this should be the minority, I'd think, otherwise you're talking about enough SQL behavioral change that your users will probably be unhappy with you.) 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] Installing PostgreSQL 10 on Mac OSX Undefined Symbol _heap_modify_tuple_by_cols

2017-10-23 Thread Tom Lane
rocess) or is something else unusual? I believe the configure script *does* pay attention to environment variables, particularly CPPFLAGS and CFLAGS. Most likely you had version-specific values in those when you ran configure, and they got absorbed into src/Makefile.global. re

Re: [GENERAL] parray_gin and \d errors in PG10

2017-10-22 Thread Tom Lane
I wrote: > Or maybe what we should do is to avoid @> in favor of using > ('d' = any(stxkind)) Pushed that way. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:/

Re: [GENERAL] parray_gin and \d errors in PG10

2017-10-22 Thread Tom Lane
Justin Pryzby writes: > On Sun, Oct 22, 2017 at 02:36:12PM -0400, Tom Lane wrote: >> ... Possibly we could use >> (stxkind @> '{d}'::pg_catalog."char"[]) >> That works for me without parray_gin installed, but I wonder whether >> it fails du

Re: [GENERAL] parray_gin and \d errors in PG10

2017-10-22 Thread Tom Lane
for me without parray_gin installed, but I wonder whether it fails due to ambiguity if you do have parray_gin installed. In principle this'd still match the text[] @> text[] operator, and I'm not sure whether we have an ambiguity resolution rule that would prefer one over the

Re: [GENERAL] Weird performance difference

2017-10-20 Thread Tom Lane
a factor of 100 at the scan level is never a good start for a join plan. Turn on use_remote_estimate (assuming these are postgres_fdw tables). Also try explicitly ANALYZE'ing the foreign tables. I do not believe auto-analyze will touch foreign tables ... regards,

Re: [GENERAL] How to find out extension directory

2017-10-20 Thread Tom Lane
ecifically, you can assume it's the "extension" subdirectory of whatever SHAREDIR is. "pg_config --sharedir" will tell you that. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] How do you decide what aggregates to add?

2017-10-20 Thread Tom Lane
forever) every little special-purpose function somebody might want. 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] Using Variables in Queries

2017-10-19 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Oct 19, 2017 at 12:14 PM, Tom Lane wrote: >> FROM products, >> (values ('red widget'::text)) consts(target) >> WHERE similarity(target, item_name) > 0.25 >> ORDER BY target <<-> item_name >>

Re: [GENERAL] Using Variables in Queries

2017-10-19 Thread Tom Lane
_name <<-> target , target <<-> item_name FROM products, (values ('red widget'::text)) consts(target) WHERE similarity(target, item_name) > 0.25 ORDER BY target <<-> item_name PG 9.5 and up will flatten out cases like this to be exactly what you wrote out longhand. 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] pgpass file type restrictions

2017-10-19 Thread Tom Lane
't it instead push the password into the PGPASSWORD > environment variable, avoiding creating .pgpass in any form? On many platforms, it's possible for other users to see the environment variables of a process. So PGPASSWORD is really quite insecure. re

Re: [GENERAL] pgpass file type restrictions

2017-10-18 Thread Tom Lane
le we can't avoid). I cannot get excited about that proposed use-case, though. How is a pipe any more secure than a plain file with the same permissions? My thought is that you shouldn't be depending on passwords at all, but on SSL credentials or Kerberos auth, both of which libpq suppor

Re: [GENERAL] Finally upgrading to 9.6!

2017-10-17 Thread Tom Lane
such a workload-dependent thing that there's no general answer. 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] Force SSL connection

2017-10-16 Thread Tom Lane
pt the connection. 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] Non-overlapping updates blocking each other

2017-10-16 Thread Tom Lane
ate query is very careful to stay in an id range. [1] > * I do have some exotic indexes [2]. gist, gin, postgis, fillfactor... I'd bet on the last one, especially since you found that the problem was a page-level lock. Did you look to see which relation the page lock was in?

Re: [GENERAL] Non-overlapping updates blocking each other

2017-10-14 Thread Tom Lane
hich rows the update depends on, or perhaps some other corner case. We'd need more info about the schema and the Postgres version to tell for sure. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Why does increasing the precision of a numeric column rewrites the table?

2017-10-11 Thread Tom Lane
x27; to '1.000' requires a change in the actually-stored value. 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] startup process stuck in recovery

2017-10-11 Thread Tom Lane
oesn't seem like enough to cause any obvious problem from a mere O(N^2) behavior. 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] startup process stuck in recovery

2017-10-10 Thread Tom Lane
re it's correct. "Doesn't get into an infinite loop" is not a sufficiently high bar. And I'm still wondering exactly what Christophe actually saw ... 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] startup process stuck in recovery

2017-10-10 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Hmm, I tried to reproduce this and could not. I experimented with >> various permutations of this: > This problem is probably related to commit 9b013dc238c, which AFAICS is > only in pg10, not 9.5. You're right, I was test

Re: [GENERAL] startup process stuck in recovery

2017-10-09 Thread Tom Lane
Peter Geoghegan writes: > Just a guess, but do you disable autovacuum on your dev machine? (I know I > do.) Nope. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgres

Re: [GENERAL] startup process stuck in recovery

2017-10-09 Thread Tom Lane
was the standby process consuming anywhere near as much CPU as the master's backend. What am I missing to reproduce the 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] Equivalence Classes when using IN

2017-10-09 Thread Tom Lane
riginally, but they allow it as of SQL:2008 or thereabouts. It might be interesting to see if the spec says anything concrete about the semantics of that. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] startup process stuck in recovery

2017-10-09 Thread Tom Lane
Christophe Pettus writes: >> On Oct 9, 2017, at 13:26, Tom Lane wrote: >> My bet is that the source server did something that's provoking O(N^2) >> behavior in the standby server's lock management. It's hard to say >> exactly what, but I'm wonde

Re: [GENERAL] startup process stuck in recovery

2017-10-09 Thread Tom Lane
Christophe Pettus writes: >> On Oct 9, 2017, at 13:01, Tom Lane wrote: >> Is that number changing at all? > Increasing: > AccessExclusiveLock | 8810 Oh, that's really interesting. So it's not *just* releasing locks but also acquiring them, which says that it is

Re: [GENERAL] startup process stuck in recovery

2017-10-09 Thread Tom Lane
r N in the low thousands it's hard to see that loop taking so long that you'd think things were stuck. > # select mode, count(*) from pg_locks where pid=5882 group by mode; > AccessExclusiveLock | 7133 Is that number changing at all? regards, tom lane

Re: [GENERAL] startup process stuck in recovery

2017-10-09 Thread Tom Lane
; Suggestions on further diagnosis? Attach to startup process with gdb, and get a stack trace? 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] Equivalence Classes when using IN

2017-10-09 Thread Tom Lane
ins to the view to be optimized, you don't want an ORDER BY in 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] Equivalence Classes when using IN

2017-10-08 Thread Tom Lane
being able to simplify "a IN somelist AND a IN someotherlist". If we wanted to do that, making the "lists" be treatable as eclass members would be a good place to start, because that would naturally result in intersect-able lists ending up in the same eclass.

Re: [GENERAL] Functions and Parentheses

2017-10-06 Thread Tom Lane
any principles of programming language syntax design that emerged later than the COBOL era. Their capacity to invent new and non-orthogonal syntax for every new feature seems boundless.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] compiling postgres_fdw fails for 9.6.5

2017-10-06 Thread Tom Lane
ilding the core code first. 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] Plan changes from index scan to seq scan after 5 executions

2017-09-30 Thread Tom Lane
wn failure modes. Anyway nobody's tried it yet. You can find more discussion of this problem in the -hackers archives. As for workarounds, the only short-term fix I can suggest is to use EXECUTE for this query in your function, thus preventing caching of a plan for it. re

Re: [GENERAL] PG 10 and perl

2017-09-29 Thread Tom Lane
;,--enable-new-dtags (That's what I see when building with a stock Linux Perl configuration and rpath enabled.) If there's no such switch, or if it doesn't point to where the libperl.so that you want to use is, then there's your problem. regards, tom lan

Re: [GENERAL] many many open files on pgsql_tmp with size 0

2017-09-28 Thread Tom Lane
it? Also, 9.3.what exactly? 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] Catching errors inside a LOOP is causing performance issues

2017-09-27 Thread Tom Lane
with the possibilities of needing to convert a exception into a branch > instead of allowing it to be fatal. Yeah, it's about the overhead of setting up and ending a subtransaction. That's a fairly expensive mechanism, but we don't have anything cheaper that is able to recover from

Re: [GENERAL] Is float8 a reference type?

2017-09-23 Thread Tom Lane
inlined, loop-unrolled memcpy(). 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] Adding Cyrillic support

2017-09-23 Thread Tom Lane
four different Cyrillic-specific character sets available already: https://www.postgresql.org/docs/current/static/multibyte.html#CHARSET-TABLE regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: ht

Re: [GENERAL] Why can't the database owner create schemas and how can I enable that?

2017-09-23 Thread Tom Lane
ting new schemas is not directly connected to ownership anyway --- it's a question of whether you have the CREATE privilege on the database. The owner should have that privilege by default, but it could be revoked, or granted to others. regards, tom lane -- Sent via pgsql

Re: [GENERAL] Is float8 a reference type?

2017-09-22 Thread Tom Lane
hink that it's worth your time to write unsafe/unportable code? Do you know that your compiler doesn't turn Float8GetDatum into a no-op already? (Mine does, on a 64-bit machine.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Dynamic use of RAISE with USING to generate and catch non-hardcoded custom exceptions

2017-09-21 Thread Tom Lane
27;OTHER ERRORS: %,%', sqlstate,sqlerrm; END$$; NOTICE: Error E0001 raised - going to do something about it Or you could do RAISE EXCEPTION SQLSTATE v_sqlstate USING message = v_msg; regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] Performance appending to an array column

2017-09-21 Thread Tom Lane
heard about a commercial fork of PG that is less bad for this type of data, but the community code is not the weapon you want. 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] hard parse?

2017-09-21 Thread Tom Lane
re 1=0; QUERY PLAN -- Result (cost=0.00..0.00 rows=0 width=8) One-Time Filter: false (2 rows) In this case the answer is "pretty far" --- you get a valid but dummy plan, which will just exit without returnin

Re: [GENERAL] Puzzled by UNION with unknown types

2017-09-20 Thread Tom Lane
-+-+--- > unknown | unknown | As of v10, this will produce a table with a column of type text, not type unknown, again as a result of more aggressively forcing unknown to be something else. 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] [HACKERS] USER Profiles for PostgreSQL

2017-09-19 Thread Tom Lane
releases?. Not particularly. You can do that sort of thing already via PAM, for example. 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] reload postgresql with invalid pg_hba.conf

2017-09-18 Thread Tom Lane
"David G. Johnston" writes: > On Mon, Sep 18, 2017 at 12:36 PM, Tom Lane wrote: >> I wouldn't say it's desired behavior, exactly, but there's no very >> good way to improve it. pg_ctl has no visibility into what the postmaster >> is thin

Re: [GENERAL] reload postgresql with invalid pg_hba.conf

2017-09-18 Thread Tom Lane
mprove it. pg_ctl has no visibility into what the postmaster is thinking. 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] Remove useless joins (VARCHAR vs TEXT)

2017-09-17 Thread Tom Lane
gt; fails to consider that the join condition may contain RelabelTypes > instead of plain Vars. > > The attached fixes. Looks like a good fix to me (except for the copied-and-pasted, not-quite-on-point comment ;-)). Pushed. regards, tom lane -- Sent via pgs

Re: [GENERAL] cursor declare

2017-09-15 Thread Tom Lane
r variable as part of a DECLARE CURSOR SQL-level command. They're not the same thing at all. In particular, there isn't any concept of parameters in the SQL DECLARE CURSOR command. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] How to add new Collation language

2017-09-14 Thread Tom Lane
ocale name. Or if you want to make a new database within an existing installation, use CREATE DATABASE directly, setting the LC_COLLATE and LC_CTYPE options (and selecting a matching ENCODING). 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] Joining 16 tables seems slow

2017-09-12 Thread Tom Lane
this you need to increase join_collapse_limit, not from_collapse_limit. (Usually, though, there's little reason not to keep them the same.) 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 error -- missing pg table

2017-09-11 Thread Tom Lane
p didn't dump that function, or it did but pg_restore isn't restoring it, perhaps because of the --schema restriction. I'm not sure why the function name isn't showing up as schema-qualified, though, if it isn't in the public schema. regards

Re: [GENERAL] B-tree index on a VARCHAR(4000) column

2017-09-10 Thread Tom Lane
ide enough to require toasting. That would save a few microseconds during table creation and drop ... but an unused toast table that's just sitting there is surely not much overhead. For every other purpose, PG just pays attention to the actual column values' lengths.

Re: [GENERAL] Analyzing performance regression from 9.2 to 9.6

2017-09-09 Thread Tom Lane
uot;."id" IS NULL should be understood as an anti-join? The planner doesn't get that at the moment, for implementation reasons that needn't concern us here. But it would get it if you said WHERE ... "report_submission"."skill_type_id" IS NULL i.e. constrain the join

Re: [GENERAL] B-tree index on a VARCHAR(4000) column

2017-09-08 Thread Tom Lane
pped to, for example, VARCHAR(256)? No. 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] WAL & ready files retained after turning off log shipping

2017-09-07 Thread Tom Lane
Ron Johnson writes: > On 09/07/2017 09:08 AM, Tom Lane wrote: >> Manual cleanup shouldn't be very hard, fortunately. Run pg_controldata >> to see where the last checkpoint is, and delete WAL files whose names >> indicate they are before that (but not the one includin

Re: [GENERAL] WAL & ready files retained after turning off log shipping

2017-09-07 Thread Tom Lane
ush all the .ready files (and .done if any) without much thought. 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

  1   2   3   4   5   6   7   8   9   10   >