Re: Code of Conduct plan

2018-06-04 Thread Tom Lane
"Joshua D. Drake" writes: > On 06/04/2018 01:46 PM, Tom Lane wrote: >> ... The reason for this is an unfortunate situation that took place in >> the FreeBSD community awhile back [1], wherein one community member was >> abusing another via Twitter, and their ex

Re: Code of Conduct plan

2018-06-04 Thread Tom Lane
again in response to the current discussions. regards, tom lane

Re: Code of Conduct plan

2018-06-04 Thread Tom Lane
end up there too. (I believe there are plans afoot to move all the "locked" wiki pages' content to the main site, but I'm not involved in making that happen.) regards, tom lane

Re: Code of Conduct plan

2018-06-04 Thread Tom Lane
Geoff Winkless writes: > On Sun, 3 Jun 2018 at 22:47, Tom Lane wrote: >> In any case, we went over all these sorts of arguments at excruciating >> length in 2016. It's quite clear to the core team that a majority of >> the community wants a CoC. I don't t

Re: Code of Conduct plan

2018-06-04 Thread Tom Lane
Adrian Klaver writes: > On 06/03/2018 11:29 AM, Tom Lane wrote: >> https://wiki.postgresql.org/wiki/Code_of_Conduct >> We are now asking for a final round of community comments. > My comments: > 1) Reiterate my contention that this is a solution is search of problem. As

Re: Code of Conduct plan

2018-06-05 Thread Tom Lane
ation where not-so-civil interactions were common, I agree that it likely wouldn't work. regards, tom lane

Re: Code of Conduct plan

2018-06-05 Thread Tom Lane
er actually done any such thing, and I'd like to think that the CoC committee will never need to ban anybody either. But if it does come to that, we'll have a much better governance mechanism in place for it. regards, tom lane

Re: Code of Conduct plan

2018-06-05 Thread Tom Lane
etails of the process are there to try to fix point 3. Yeah, managing the committee is a lot of overhead that in an ideal world we wouldn't need, but I think we have to accept it to have a process people will have confidence in. regards, tom lane

Re: limit and query planner

2018-06-05 Thread Tom Lane
seqscan-and-sort wins if the need is to fetch the whole table. regards, tom lane

Re: Code of Conduct plan

2018-06-05 Thread Tom Lane
the sense to walk away. (Maybe we could put something in the CoC about that, but I have the sense that it'd do more harm than good.) regards, tom lane

Re: Code of Conduct plan

2018-06-05 Thread Tom Lane
he situation, thus driving away people who might otherwise have joined the community. I'm getting a little tired of people raising hypothetical harms and ignoring the real harms that we're hoping to fix. Yes, this is an experiment and it may not work, but we can't find out without trying. If it turns out to be a net loss, we'll modify it or abandon it. regards, tom lane

Re: Segfault leading to crash, recovery mode, and TOAST corruption

2018-06-05 Thread Tom Lane
e the errors stop, and all will be well. But an update would be prudent to prevent it from happening again. regards, tom lane

Re: Code of Conduct plan

2018-06-05 Thread Tom Lane
geeks ;-). So I suspect that the pool of potential members is not really very large. Plus, since we put a time limit on how long people can serve, we're going to need a fresh set of faces every couple years. So we shouldn't fool ourselves about how much we're going to be able to as

Re: Code of Conduct plan

2018-06-05 Thread Tom Lane
Adrian Klaver writes: > On 06/05/2018 04:41 PM, Tom Lane wrote: >> I'm getting a little tired of people raising hypothetical harms and >> ignoring the real harms that we're hoping to fix. Yes, this is an >> experiment and it may not work, but we can't find ou

Re: Using distinct in an aggregate prevents parallel execution?

2018-06-06 Thread Tom Lane
tinct-ification processing into a separate plan node. agg(... ORDER BY ...) has got the same problem, and it'd likely be advisable to fix that at the same time. regards, tom lane

Re: Which backend using which pg_temp_N schema?

2018-06-06 Thread Tom Lane
be objects in the schema that are left over from a crashed session that previously had the same BackendId. We only make an effort to clean out such objects at the time that a session first creates a temp object. In any case, I think you're right that this isn't exposed at the SQL level presently. regards, tom lane

Re: Slow planning time for simple query

2018-06-06 Thread Tom Lane
elp in investigating that. regards, tom lane

Re: Code of Conduct plan

2018-06-06 Thread Tom Lane
removal from the committee or core is another possible sanction, in addition to those mentioned above. regards, tom lane

Re: Code of Conduct plan

2018-06-06 Thread Tom Lane
in my proposed addition, and then we're good. regards, tom lane

Re: Code of Conduct plan

2018-06-06 Thread Tom Lane
ink in the CoC traffic is likely to be the individual committee members' email accounts --- I trust they'll take some suitable precautions. regards, tom lane

Re: Slow planning time for simple query

2018-06-06 Thread Tom Lane
s a lot of recently-dead rows at either extreme of the range of table1.source_id or table2.id? We made a fix last year to improve that: https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=3ca930fc3 but it wasn't back-patched. regards, tom lane

Re: Slow planning time for simple query

2018-06-06 Thread Tom Lane
Jerry Sievers writes: > Tom Lane writes: >> Oh, hmm, yeah it could be ye olde get_actual_variable_range() issue. >> When this happens, are there perhaps a lot of recently-dead rows at either >> extreme of the range of table1.source_id or table2.id? > We noticed the c

Code of Conduct committee: call for volunteers

2018-06-07 Thread Tom Lane
tell us that is helpful for us to know about your potential involvement with the CoC Committee? regards, tom lane [1] https://wiki.postgresql.org/wiki/Code_of_Conduct

Re: Query hitting empty tables taking 48 minutes

2018-06-07 Thread Tom Lane
nd if so whether that's worse than a "custom" plan for the specific parameter value.) If the job_id column has fairly uniform statistics, this exercise probably won't turn up anything surprising ... but if it doesn't, we might find that the issue comes from a stupidly chosen generic plan. regards, tom lane

Re: Code of Conduct plan

2018-06-07 Thread Tom Lane
war or driving away either person. They may not always succeed. But not trying is not a better answer. regards, tom lane

Re: Code of Conduct plan

2018-06-08 Thread Tom Lane
... which *is* spelled out in the document. regards, tom lane

Re: (2^63 - 1)::bigint => out of range? (because of the double precision)

2018-06-08 Thread Tom Lane
tion, btw. ;-) We didn't get around to implementing that till v10. regards, tom lane

Re: Slow planning time for simple query

2018-06-09 Thread Tom Lane
ly much worse) planner range estimates. I'm unsure if that's a good tradeoff or not. regards, tom lane

Re: pg_upgrade and wraparound

2018-06-09 Thread Tom Lane
database has an OID of 0? Well, none do, so the correct question is what is passing an invalid database OID to the code that's complaining. This sure looks like a bug, though I'm not sure we have enough info to locate it. regards, tom lane

Re: pg_upgrade and wraparound

2018-06-11 Thread Tom Lane
t for the old cluster, as well as "select datname, datfrozenxid from pg_database" output from the old cluster. regards, tom lane

Re: Does pgAgent support chinese, japanese characters?

2018-06-12 Thread Tom Lane
ately, I don't know anything about how to adjust that in Windows. A brute-force way would be to issue "set client_encoding" in your scripts, but there may be a better way. regards, tom lane

Re: Semantics around INSERT INTO with SELECT and ORDER BY.

2018-06-12 Thread Tom Lane
et burnt. As of 9.6, there are more guarantees in this area than there used to be (cf commit 9118d03a8), but I don't think it matters as long as you write an ORDER BY. regards, tom lane

Re: First query on each connection is too slow

2018-06-13 Thread Tom Lane
ries. If that doesn't fix it, (b) could perhaps be alleviated by adopting connection pooling, though that has costs of its own. regards, tom lane

Re: Replica string comparsion issue

2018-06-13 Thread Tom Lane
erving to defeat selection of an indexscan. Why it's corrupt, I dunno, but you might try forcing a reindex on the master. regards, tom lane

Re: Replica string comparsion issue

2018-06-13 Thread Tom Lane
rection. If the standby's OS sorts strings differently than the master does, the index will seem corrupt to it, even if it's fine on the master. regards, tom lane

Re: Clarifying "timestamp with time zone"

2018-06-15 Thread Tom Lane
s it's worth at least clarifying the docs about this, Don't the docs describe the behavior pretty clearly already? regards, tom lane

Re: What to do when dynamic shared memory control segment is corrupt

2018-06-18 Thread Tom Lane
cal crash recovery to me: corrupt shared memory contents are expected and recovered from after a crash. However, we don't expect postmaster.pid to get mucked with. regards, tom lane

Re: What to do when dynamic shared memory control segment is corrupt

2018-06-18 Thread Tom Lane
Andres Freund writes: > On 2018-06-18 12:30:13 -0400, Tom Lane wrote: >> Sherrylyn Branchaw writes: >>> LOG: server process (PID 138529) was terminated by signal 6: Aborted >> Hm ... were these installations built with --enable-cassert? If not, >> an abort trap s

Re: What to do when dynamic shared memory control segment is corrupt

2018-06-18 Thread Tom Lane
ing the postmaster manually if it died. Maybe don't do that repeatedly without human intervention; but PG is pretty robust against crashes. We developers crash it all the time, and we don't lose data. regards, tom lane

Re: Find schema-qualified table name given unqualified name

2018-06-19 Thread Tom Lane
espace instead of relying on regnamespace. regards, tom lane

Re: Plan output: actual execution time not considering loops?

2018-06-20 Thread Tom Lane
uot;timing off" to the EXPLAIN options, then that's probably a factor in making the Agg node look relatively expensive. regards, tom lane

Re: tsvector field length limitation

2018-06-20 Thread Tom Lane
for tsvector, which stores lexeme offsets in 20-bit fields (cf WordEntry in src/include/tsearch/ts_type.h). Perhaps that was short-sighted but I don't foresee it changing anytime soon. You'd more or less need a whole new datatype ("bigtsvector"?) to make it happen. regards, tom lane

Re: SQL Query never ending...

2018-06-21 Thread Tom Lane
least some of the joins to tt_eotb1 might be unnecessary?) regards, tom lane

Re: Too many range table entries error

2018-06-25 Thread Tom Lane
found a way to reach this error without having waited a few hours beforehand. And we are *not* going to promise to fix all the performance issues you will hit with a schema design like this. Redesign. Please. regards, tom lane

Re: CTE optimization fence

2018-06-26 Thread Tom Lane
deration? Nothing's actually happened since then ... it's still under consideration, but we have to settle on a way of controlling it. regards, tom lane

Re: dumping only table definitions

2018-06-29 Thread Tom Lane
es '*.*'" might work, too. Be careful about shell-command quoting. regards, tom lane

Re: Cloning schemas

2018-07-02 Thread Tom Lane
text,text,boolean), row 66 in > EXECUTE I guess audit_sq is a sequence? It looks to me like this function has not been taught about the changes in sequence metadata in PG v10. You need to update it, or talk to its author about an update. regards, tom lane

Re: except all & WITH - syntax error?

2018-07-02 Thread Tom Lane
b-select as I suspect you're thinking. In short: WITH has lower syntactic precedence than UNION/INTERSECT/EXCEPT. You need parens if you want it to work the other way 'round. regards, tom lane

Re: Not able to update some rows in a table

2018-07-02 Thread Tom Lane
;t-update problem is related to the fuzzy behavior of floating-point columns. Just because a float8 value prints out as "1.2345" doesn't mean that it'll be considered equal to a value you write as "1.2345". If this fact astonishes you, you should likely switch to type numeric. regards, tom lane

Re: When exactly is a TIMESTAMPTZ converted to the sessions time zone?

2018-07-03 Thread Tom Lane
wrong so far as text output is concerned. If you retrieve data in binary format, though, it looks like you get the raw (un-rotated) timestamp value, so that any conversion would have to be done on the client side. regards, tom lane

Re: Unable to Connect to DB Instance

2018-07-04 Thread Tom Lane
ike it's related to pg_authid or pg_db_role_setting. regards, tom lane

Re: Postgres sometimes stalling on 'percentile_cont'

2018-07-04 Thread Tom Lane
ki/Slow_Query_Questions It'd be particularly useful to compare EXPLAIN output in both the "slow" and "fast" states. regards, tom lane

Re: Unable to Connect to DB Instance

2018-07-04 Thread Tom Lane
ht then need to REINDEX pg_db_role_setting to get its indexes in sync with it being empty.) Whether an equally drastic answer is tolerable for your other missing table(s) depends on what they are... regards, tom lane

Re: User-defined function with anyrange[]

2018-07-06 Thread Tom Lane
s. However, you can use overloading to define several functions of the same name, and just write out one for each range type you actually need this functionality for. I haven't really seen applications that need so many range types that this'd be intolerable. regards, tom lane

Re: timestamp (military) at time zone without the suffix

2018-07-11 Thread Tom Lane
some other way of dropping the fractional second, probably select current_timestamp(0) at time zone 'utc'; regards, tom lane

Re: Postgres sometimes stalling on 'percentile_cont'

2018-07-12 Thread Tom Lane
PLAIN (without ANALYZE) output for the slow and fast cases. What I'm wondering about is whether the shape of the plan changes. regards, tom lane

Re: Disable TRUST authentication by using ClientAuthentication_hook

2018-07-13 Thread Tom Lane
gle-user mode and use that to issue an ALTER USER ... PASSWORD command. As long as your patch doesn't break single-user mode, you don't need any other escape hatch. regards, tom lane

Re: two instances of postgres on the same machine?

2018-07-15 Thread Tom Lane
ch about the Postgres App packaging so I can't offer any advice there. I also don't know how hard it is to get the Aqua client you mention to talk to a nonstandard port number, though I'd guess that it's possible. regards, tom lane

Re: User documentation vs Official Docs

2018-07-16 Thread Tom Lane
nage it etc... You haven't exactly explained how that wouldn't be equally true of this hypothetical new thing. regards, tom lane

Re: Can't compile postgresql 11 on FreeBSD 11.1

2018-07-17 Thread Tom Lane
t it does *not* set that up to be part of gcc's default search paths. (Security 1, usability 0.) You need these configure flags to do much of anything on that platform: --with-includes=/usr/local/include --with-libs=/usr/local/lib regards, tom lane

Re: A bit confused about "pgsql_tmp" vs "temp tablespace"

2018-07-18 Thread Tom Lane
Thomas Kellerer writes: > But what about the (temp) space needed for e.g. sorting, grouping or > intermediate results from CTEs or derived tables? > Is that also controlled through the temp_tablespaces? Yes. regards, tom lane

Re: cache lookup failed for attribute 1 of relation XXXXXX

2018-07-19 Thread Tom Lane
ave AccessShareLock on, so I'm not quite sure how we could end up with this result. Maybe the true explanation is more complicated, like an ALTER DROP COLUMN that committed just as pg_dump was starting. Have you got records of any DDL being done at that time? regards, tom lane

Re: cache lookup failed for attribute 1 of relation XXXXXX

2018-07-19 Thread Tom Lane
tectural reasons the protection is not 100%; sometimes you can get odd failures like this, essentially due to "clock skew" between pg_dump's view of the catalogs and the server's view of the catalogs. As long as it works on retry, I wouldn't worry too much about it. regards, tom lane

Re: functions with side effect

2018-07-19 Thread Tom Lane
Right now it seems the nextval is done first, but I would not want to bet on that staying true in the future. [ experiments some more ... ] Actually, looks like we have a rule against flattening sub-selects whose targetlists contain volatile functions, so maybe you'd get away with that for the indefinite future too. regards, tom lane

Re: Restore from dumps

2018-07-25 Thread Tom Lane
l_days" > rather than "all_days". Per the error message, what needs fixing is the SQL function "bdays", not the matview as such. regards, tom lane

Re: Order in which tables are dumped

2018-07-25 Thread Tom Lane
al sorting? Dependencies can override the normal sort order, though a dependency directly between two tables is rare. regards, tom lane

Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function

2018-07-25 Thread Tom Lane
clear why hacking CacheInvalidateHeapTuple in this fashion fixes that, or why we could expect it to stay fixed. regards, tom lane

Re: postgres with xcode

2018-07-29 Thread Tom Lane
o that client and attach to it with gdb/lldb. Perhaps xcode can do an "attach to running process", though at this point I'm wondering if it starts extra threads when it does so. regards, tom lane

Re: postgres with xcode

2018-07-29 Thread Tom Lane
rned that most of the stuff on the TODO list is either obsolete or hard (sometimes more hard-to-get-consensus-for than hard- to-do-technically). We don't maintain that list very well :-( regards, tom lane

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-07-30 Thread Tom Lane
oduces ALTER ROLE joe SET search_path TO "$user", public; There was a relevant bug fix in March (commit 742869946) ... are you certain this is a 10.4 server, and not 10.3 or older? regards, tom lane

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-07-30 Thread Tom Lane
Achilleas Mantzios writes: > On 30/07/2018 16:51, Tom Lane wrote: >> Hm, that's not happening for me: > You (and Adrian) are right. This is due to our own tweaking (which I had > forgotten). Sorry for the false alarm. It looks like your hack was to work around the bug tha

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Tom Lane
d of it on the grounds that its semantics were too squishy to be useful. What you want is something like select relname from pg_class c where relkind = 'r' and not exists (select 1 from pg_index where indrelid = c.oid and indisprimary); which will give the right answer in all PG versions. regards, tom lane

Re: Incorrect description of the WITH CHECK in the row security can lead to the security issue

2018-07-30 Thread Tom Lane
I've pushed a patch along that line. Thanks for the report! regards, tom lane

Re: alter table docs

2018-07-30 Thread Tom Lane
Rob Sargent writes: > Exactly.  That that is in the "box" made me think a similar blurb for > the non-index version should be there also. This seems to have been fixed in v11 but not back-patched. regards, tom lane

Re: Question on postgresql.conf

2018-07-31 Thread Tom Lane
/postgres-.cnf and then just start the postmaster without any weird switches. In this way you will avoid breaking PG-specific tools that expect to find the config file at its standard location. regards, tom lane

Re: Question on postgresql.conf

2018-07-31 Thread Tom Lane
ipt that you intended to set the env variable just overwrite $PGDATA/postgresql.conf with the right thing. regards, tom lane

Re: Strange behavior with missing column in SQL function

2018-07-31 Thread Tom Lane
;d need some other API. If we did change this, then it'd be reasonable to tighten the error message behavior; but as things stand, sql_fn_post_column_ref doesn't know what's going on so it's not in a position to throw a reliable error message. regards, tom lane

Re: How to prevent "no wait lock" after a connection drop

2018-07-31 Thread Tom Lane
it there waiting for more data, and it'll be holding whatever locks it had too. You could adjust the server's tcp_keepalives_xxx settings to make it notice the connection drop more quickly. regards, tom lane

Re: Adding terminal title support for psqlrc

2018-08-01 Thread Tom Lane
in the title. There's an example in https://www.postgresql.org/docs/devel/static/app-psql.html#APP-PSQL-PROMPTING although it's just talking about a color change. regards, tom lane

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Tom Lane
ormal and not worrisome. autovacuum should kick in and do something about it at 200 million xacts (autovacuum_freeze_max_age). regards, tom lane

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Tom Lane
regards, tom lane

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-08-01 Thread Tom Lane
Achilleas Mantzios writes: > On 30/07/2018 17:00, Tom Lane wrote: >> It looks like your hack was to work around the bug that was fixed >> properly in 742869946. You should be able to undo that now ... > On pgsql 10.4 , I reverted (undi

Re: Template0 datfrozenxid age is 160million and progressing

2018-08-01 Thread Tom Lane
Andres Freund writes: > On 2018-08-01 10:24:24 -0400, Tom Lane wrote: >> IMO, the action you need to take is enabling autovacuum. We've >> seen many many people go down the path you are taking, and it's >> generally led to no good in the end. Manual vacuuming

Re: List user who have access to schema

2018-08-02 Thread Tom Lane
regards, tom lane

Re: List of objects owned by a schema/owner

2018-08-03 Thread Tom Lane
hree options for schemas, though the details of each are a bit different (in particular, schema dependencies would be found in pg_depend not pg_shdepend). regards, tom lane

Re: Eror while dropping a user

2018-08-03 Thread Tom Lane
ight also care to read up on DROP OWNED BY. regards, tom lane

Re: PANIC: could not open critical system index 2662

2018-08-04 Thread Tom Lane
that doesn't work, it's time to hire professional help --- there are several companies that specialize in PG data recovery. regards, tom lane

Re: ALTER TABLE .. SET STATISTICS

2018-08-05 Thread Tom Lane
Ron writes: > For columns of type bytea which store image data (PDFs, JPGs, etc) would it > speed up the ANALYZE process to SET STATISTICS = 0? Should do, though I'm not sure how much of an effect you'd see. regards, tom lane

Re: How to revoke privileged from PostgreSQL's superuser

2018-08-06 Thread Tom Lane
ruser can do is inherent in being the owner of all the built-in database objects, and that you cannot get rid of. Objects have to be owned by somebody. regards, tom lane

Re: Immutable function WAY slower than Stable function?

2018-08-06 Thread Tom Lane
e penalty is that high.) regards, tom lane

Re: Immutable function WAY slower than Stable function?

2018-08-06 Thread Tom Lane
g. The reason that EXPLAIN VERBOSE is helpful here is that you can see whether the function got inlined or not: do you see a call to the function, or a representation of its body? regards, tom lane

Re: Immutable function WAY slower than Stable function?

2018-08-07 Thread Tom Lane
Ken Tanzer writes: > On Mon, Aug 6, 2018 at 7:42 PM Tom Lane wrote: >> The reason that EXPLAIN VERBOSE >> is helpful here is that you can see whether the function got inlined >> or not: do you see a call to the function, or a representation of >> its body? > Ther

Re: Immutable function WAY slower than Stable function?

2018-08-07 Thread Tom Lane
7;m not sure if such practices are still popular, but somebody who was doing that would not appreciate nannyism. regards, tom lane

Re: check_function_bodies not doing much

2018-08-07 Thread Tom Lane
re are some external tools floating around that check things more aggressively, and hence with a higher rate of false positives. regards, tom lane

Re: check_function_bodies not doing much

2018-08-07 Thread Tom Lane
"David G. Johnston" writes: > On Tue, Aug 7, 2018 at 12:31 PM, Tom Lane wrote: >> Yes. It's supposed to be a syntax check, not a check that the function >> would work when executed. (Depending on the particular PL you're using, >> which you didn&#x

Re: select version() with internal number version?

2018-08-09 Thread Tom Lane
oids a round trip to the server, and (b) works further back than server_version_num, though that issue is probably academic to most folk at this point (server_version_num appeared in 8.2). regards, tom lane

Re: PostgreSQL C Language Extension with C++ Code

2018-08-12 Thread Tom Lane
n #ifdef there. If you don't have the macro defined, you want to fail, not silently build an extension without it. It's possible you need extern "C" { ... } around the macro, too. regards, tom lane

Re: PostgreSQL C Language Extension with C++ Code

2018-08-12 Thread Tom Lane
uot; around the PG_FUNCTION_INFO_V1 macro, too. Both those macros produce C function definitions under the hood, and said functions need to not be name-mangled by C++. regards, tom lane

Re: PostgreSQL C Language Extension with C++ Code

2018-08-12 Thread Tom Lane
eak your bad C++ habits. regards, tom lane

Re: Safe operations?

2018-08-12 Thread Tom Lane
e or less O(log N) (N being the number of rows in that catalog). But in practice the main constraint is often the need to obtain locks on the relevant database objects, and that's really hard to give a prediction for. regards, tom lane

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