[HACKERS] Comment typo in nodeWindowAgg.c

2010-12-21 Thread Andreas Karlsson
arallel to advance_aggregates in nodeAgg.c */ static void advance_windowaggregate(WindowAggState *winstate, Regards, Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] obj_unique_identifier(oid)

2011-01-08 Thread Andreas Karlsson
One example row produced by that query. array_agg | array_agg ---+- {10608,10612} | {1009,1015} (1 row) Regards, Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] obj_unique_identifier(oid)

2011-01-08 Thread Andreas Karlsson
Here is a patch, but I am not sure I am not sure if I like my idea for format. What do you think? SELECT pg_describe_object('pg_amproc'::regclass,oid,0) FROM pg_amproc WHERE oid IN (10608,10612); pg_describe_object

[HACKERS] Bug in pg_describe_object (was: Re: [HACKERS] obj_unique_identifier(oid))

2011-01-10 Thread Andreas Karlsson
Here is the bug-fix patch again with a description of the context so I can add it to the commit fest. Joel Jacobson discovered a bug in the function pg_describe_object where it does not produce unique identifiers for some entries in pg_amproc. This patch fixes the bug where when two entries in pg

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Andreas Karlsson
On Tue, 2011-01-11 at 11:43 -0500, Tom Lane wrote: > If that's what you're after, getObjectDescription is entirely > unsuitable, because of the fact that its results are dependent > on search path and language settings. > > regards, tom lane Agreed, and as long as the additi

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Andreas Karlsson
On Tue, 2011-01-11 at 14:01 -0500, Tom Lane wrote: > It really shouldn't be useful to include those. Attend what it says in > the fine manual for CREATE OPERATOR CLASS: > > In a FUNCTION clause, the operand data type(s) the function is > intended to support, if different from the inpu

Re: [HACKERS] Bug in pg_describe_object, patch v2

2011-01-12 Thread Andreas Karlsson
Here is a very simple change of the patch to make the output look more like the syntax of ALTER OPERATOR FAMILY to improve consistency. Before patch: function 1 bttextcmp(text,text) of operator family array_ops for access method gin With the first version: function 1 bttextcmp(text,text) of op

Re: [HACKERS] psql: Add \dL to show languages

2011-01-15 Thread Andreas Karlsson
Hi Josh, Here is my review of this patch for the commitfest. Review of https://commitfest.postgresql.org/action/patch_view?id=439 Contents and Purpose This patch adds the \dL command in psql to list the procedual languages. To me this seems like a useful addition to the co

Re: [HACKERS] Bug in pg_describe_object, patch v2

2011-01-15 Thread Andreas Karlsson
On Sat, 2011-01-15 at 10:36 -0500, Tom Lane wrote: > But I can read the handwriting on the wall: if I want this done right, > I'm going to have to do it myself. > > regards, tom lane Do I understand you correctly if I interpret what you would like to see is the same format u

Re: [HACKERS] psql: Add \dL to show languages

2011-01-17 Thread Andreas Karlsson
On Mon, 2011-01-17 at 07:37 +0100, Magnus Hagander wrote: > Yeah. Procedural langauges may strictly be wrong, but people aren't > likely to misunderstand it. That was idea when suggesting we call it "procedural languages". It is short and I do not think it can be misunderstood. Regards, Andreas

Re: [HACKERS] psql: Add \dL to show languages

2011-01-17 Thread Andreas Karlsson
On Sun, 2011-01-16 at 22:32 -0500, Josh Kupershmidt wrote: > On Sat, Jan 15, 2011 at 8:26 PM, Andreas Karlsson wrote: > > Should we include a column in \dL+ for the laninline function (DO > > blocks)? > > Hrm, I guess that could be useful for the verbose output at least. M

Re: [HACKERS] Bug in pg_describe_object, patch v2

2011-01-17 Thread Andreas Karlsson
On Sun, 2011-01-16 at 14:28 -0500, Tom Lane wrote: > One other point here is that I find messages like this a mite > unreadable: > > function 1 (oidvector[], oidvector[]) btoidvectorcmp(oidvector,oidvector) of > operator family array_ops for access method gin > > If we were to go with this, I'd

Re: [HACKERS] psql: Add \dL to show languages

2011-01-18 Thread Andreas Karlsson
Hi Josh, Nope, I do not have any better ideas than "DO Blocks?". Everything looks good with the exception one bug now. \dL foo * QUERY ** SELECT l.lanname AS "Name", pg_catalog.pg_get_userbyid(l.lanowner) as "Owner", l.lanpltrusted AS "Trusted" FROM pg_catalog.pg_la

Re: [HACKERS] psql: Add \dL to show languages

2011-01-19 Thread Andreas Karlsson
On Tue, 2011-01-18 at 19:34 -0500, Josh Kupershmidt wrote: > Got that now too. I lost my ~/.emacs file recently, which is mostly > why I'm making whitespace mistakes. Rebuilding slowly though; > (setq-default show-trailing-whitespace t) is what I needed. Aha, I see. > I left the "Call Handler" an

Re: [HACKERS] One Role, Two Passwords

2011-01-21 Thread Andreas Karlsson
On Fri, 2011-01-21 at 11:00 -0500, Garick Hamlin wrote: > I can't tell if PG supports querying a secondary RADIUS server? > > I don't see how I would do it with the syntax here ... > http://developer.postgresql.org/pgdocs/postgres/auth-methods.html > > Are multiple servers not supported? > >

[HACKERS] Put json type into alphabetical order in manual table

2013-11-25 Thread Andreas Karlsson
? -- Andreas Karlsson diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml new file mode 100644 index dea5195..fb9c41a *** a/doc/src/sgml/datatype.sgml --- b/doc/src/sgml/datatype.sgml *** *** 137,142 --- 137,148 +json + +JSON

Re: [HACKERS] Put json type into alphabetical order in manual table

2013-11-25 Thread Andreas Karlsson
On 11/25/2013 11:52 PM, Merlin Moncure wrote: On Mon, Nov 25, 2013 at 3:07 PM, Andreas Karlsson wrote: Hi, When looking at table 8-1 at http://www.postgresql.org/docs/9.3/static/datatype.html i noticed that all types except for json was in alphabetical order. I have attached a patch which

[HACKERS] Todo item: Support amgettuple() in GIN

2013-11-28 Thread Andreas Karlsson
/ca+tgmobzhfrjnyz-fyw5kdtrurk0hjwp0vtp5fgzle6evsw...@mail.gmail.com -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Todo item: Support amgettuple() in GIN

2013-11-29 Thread Andreas Karlsson
On 11/29/2013 09:54 AM, Antonin Houska wrote: On 11/29/2013 01:13 AM, Andreas Karlsson wrote: When doing partial matching the code need to be able to return the union of all TIDs in all the matching posting trees in TID order (to be able to do AND and OR operations with multiple search keys

Re: [HACKERS] Todo item: Support amgettuple() in GIN

2013-11-29 Thread Andreas Karlsson
hat a TIDBitmap based on the fast update pending list always will fit in the memory. That does not sound like a good assumption to me. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/

Re: [HACKERS] What are multixactids?

2013-12-09 Thread Andreas Karlsson
ub.com/postgres/postgres/blob/d9250da032e723d80bb0150b9276cc544df6a087/src/backend/access/heap/README.tuplock#L68 -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] What are multixactids?

2013-12-09 Thread Andreas Karlsson
On 12/09/2013 08:05 PM, hubert depesz lubaczewski wrote: Thanks. Read that. Still, it would be good to have some information in normal docs, but I guess this has to do for now. It is mentioned several times in the documentation but I do not think it is explained anywhere. -- Andreas

Re: [HACKERS] PoC: Partial sort

2013-12-14 Thread Andreas Karlsson
you considered? -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] PoC: Partial sort

2013-12-18 Thread Andreas Karlsson
used with an increased chance of spilling to disk. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Planning time in explain/explain analyze

2013-12-23 Thread Andreas Karlsson
0.27 rows=1 width=68) (actual time=0.009..0.010 rows=1 loops=1) Index Cond: (oid = s.datid) Planning time: 0.264 ms Total runtime: 0.158 ms (11 rows) Links 1. http://www.postgresql.org/message-id/cacfv+pknembqyjpcqrgsvmc_hvrgai3d_ge893n8qbx+ymh...@mail.gmail.com -- Andreas Karlsson diff

Re: [HACKERS] trailing comment ghost-timing

2013-12-23 Thread Andreas Karlsson
guess one would have to modify psql_scan() to check if a scanned query only contains comments and then not send it to the server at all. The minimal file to reproduce it is: /**/ -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] PoC: Partial sort

2013-12-23 Thread Andreas Karlsson
ut the improvements to joins. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] trailing comment ghost-timing

2013-12-23 Thread Andreas Karlsson
Commands: PQexec(..., "/**/;"); PQexec(..., "/**/"); If this has to be fixed it should be in the client. I think people would complain if we broke the API by starting to throw an exception on PQexec with a string containing no actual query. -- Andreas Karlsson -- Sent

Re: [HACKERS] Planning time in explain/explain analyze

2013-12-23 Thread Andreas Karlsson
On 12/24/2013 03:33 AM, Tom Lane wrote: Andreas Karlsson writes: The patch does not include any changes to documentation or tests. I will fix that if people think this patch is useful. I take it you've not tried the regression tests with this. Yeah, forgot to mention that we need som

Re: [HACKERS] trailing comment ghost-timing

2013-12-24 Thread Andreas Karlsson
hen I thought the server should print timing even if PGRES_EMPTY_QUERY is returned. Now after thinking on it I am not so sure. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Planning time in explain/explain analyze

2013-12-24 Thread Andreas Karlsson
On 12/24/2013 02:31 PM, Peter Eisentraut wrote: On 12/23/13, 8:12 PM, Andreas Karlsson wrote: A user asked in -performance[1] if there is a way to measure the planning time. log_planner_stats Thanks for the suggestion, I will use that if I need to know the plan times. But I do not think

Re: [HACKERS] Planning time in explain/explain analyze

2013-12-24 Thread Andreas Karlsson
tion should not clutter anything too much. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] A GIN index internals question

2013-12-27 Thread Andreas Karlsson
key into a tidbitmap. This tidbitmap becomes lossy if the matching TIDs do not fit into the workmem. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Planning time in explain/explain analyze

2013-12-28 Thread Andreas Karlsson
New version of the patch with updated documentation and which does not display the planning time when the COSTS are off. I will add it to the next commitfest. -- Andreas Karlsson diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml new file mode 100644 index 2af1738..240a3d5

Re: [HACKERS] PoC: Partial sort

2013-12-31 Thread Andreas Karlsson
d a possibility for improvement. You could decrement the bound for the tuplesort after every completed sort. Otherwise the optimizations for small limits wont apply to partial sort. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to yo

Re: [HACKERS] Planning time in explain/explain analyze

2014-01-02 Thread Andreas Karlsson
the next version of the patch. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Planning time in explain/explain analyze

2014-01-08 Thread Andreas Karlsson
locks on some architectures. Also I feel that such a patch would be more invasive. Just my reasoning for the current solution. I welcome any opinions about how to print planning time for prepared statements since I am not a heavy user of them. -- Andreas Karlsson diff --git a/doc/src/sgml/perfo

Re: [HACKERS] [PATCH] Relocation of tablespaces in pg_basebackup

2014-01-09 Thread Andreas Karlsson
ent I see is 0001-SQL-assertions-prototype.patch. Best regards, Andreas -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-12 Thread Andreas Karlsson
here. Any example how this would look compared to your RETURNING REJECTS proposal? -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [PATCH] Relocation of tablespaces in pg_basebackup

2014-01-12 Thread Andreas Karlsson
he upcoming commitfest when you feel it is ready for a review. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-12 Thread Andreas Karlsson
On 01/12/2014 11:20 PM, Peter Geoghegan wrote: On Sun, Jan 12, 2014 at 8:12 AM, Andreas Karlsson wrote: On 01/11/2014 11:42 PM, Peter Geoghegan wrote: I recently suggested that rather than RETURNING REJECTS, we could have a REJECTING clause, which would see a DML statement project strictly

Re: [HACKERS] Planning time in explain/explain analyze

2014-01-13 Thread Andreas Karlsson
the consensus is that we want to always measure it I will look at implementing that instead. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Checksums by default?

2017-01-21 Thread Andreas Karlsson
On 01/21/2017 04:48 PM, Stephen Frost wrote: * Fujii Masao (masao.fu...@gmail.com) wrote: If the performance overhead by the checksums is really negligible, we may be able to get rid of wal_log_hints parameter, as well. Prior benchmarks showed it to be on the order of a few percent, as I recal

Re: [HACKERS] \h tab-completion

2017-02-03 Thread Andreas Karlsson
attached a patch where I add completion for \h ALTER and \h DROP. Andreas commit 045c92b10eb8777d29fc920c55561d645c0b8f30 Author: Andreas Karlsson Date: Fri Feb 3 13:05:48 2017 +0100 Add compleition for \help DROP|ALTER diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab

Re: [HACKERS] 'text' instead of 'unknown' in Postgres 10

2017-02-07 Thread Andreas Karlsson
On 02/07/2017 03:14 PM, Daniele Varrazzo wrote: In psycopg '{}'::unknown is treated specially as an empty array and converted into an empty list, which allows empty lists to be passed to the server as arrays and returned back to python. Without the special case, empty lists behave differently fro

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-02-11 Thread Andreas Karlsson
On 02/02/2015 03:10 PM, Andres Freund wrote: I think if we should instead just use the new index, repoint the dependencies onto the new oid, and then afterwards, when dropping, rename the new index one onto the old one. That means the oid of the index will change and some less than pretty grovell

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-02-13 Thread Andreas Karlsson
On 02/13/2017 06:31 AM, Michael Paquier wrote: - What should we do with REINDEX DATABASE CONCURRENTLY and the system catalog? I so not think we can reindex the system catalog concurrently safely, so what should REINDEX DATABASE do with the catalog indexes? Skip them, reindex them while taking loc

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2016-11-24 Thread Andreas Karlsson
On 11/24/2016 08:46 AM, Michael Paquier wrote: On Sat, Nov 12, 2016 at 3:42 AM, Andreas Karlsson wrote: On 11/11/2016 07:40 PM, Andreas Karlsson wrote: Here is a new version of the patch with the only differences; 1) The SSL tests have been changed to use reload rather than restart Did you

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2016-11-24 Thread Andreas Karlsson
On 11/24/2016 02:49 PM, Andreas Karlsson wrote: Thanks for finding this. I will look at this more once I get home, but the tests do not fail on my computer. I wonder what I do differently. What versions of Perl and OpenSSL do you run and how did you run the tests when the failed? I ran the

[HACKERS] Broken SSL tests in master

2016-11-24 Thread Andreas Karlsson
Hi, The SSL test suite (src/test/ssl) is broken in the master since commit 9a1d0af4ad2cbd419115b453d811c141b80d872b, which is Robert's refactoring of getting the server hostname for GSS, SSPI, and SSL in libpq. The error we get in the test suite: # Running: psql -X -A -t -c SELECT 'connected

Re: [HACKERS] Broken SSL tests in master

2016-11-24 Thread Andreas Karlsson
On 11/24/2016 10:38 PM, Andreas Karlsson wrote: To me it feels like the proper fix would be to make PQHost() return the value of the host parameter rather than the hostaddr (maybe add a new field in the pg_conn_host struct). But would be a behaviour change which might break someones application

Re: [HACKERS] Broken SSL tests in master

2016-11-24 Thread Andreas Karlsson
On 11/25/2016 06:11 AM, Tsunakawa, Takayuki wrote: However, I wonder whether the hostaddr parameter should also accept multiple IP addresses. Yeah, I too thought about if we should fix that. I feel like it would make sense to add support for multiple hostaddrs. For consitency's sake if nothi

Re: [HACKERS] Broken SSL tests in master

2016-11-24 Thread Andreas Karlsson
On 11/25/2016 07:19 AM, Tsunakawa, Takayuki wrote: Specifying multiple hosts is a new feature to be introduced in v10, so that's here: https://www.postgresql.org/docs/devel/static/libpq-connect.html Thanks, I had missed that patch. If we add support for multiple hosts I think we should also

Re: [HACKERS] pgcrypto compilation error due to stack-allocated EVP_CIPHER_CTX

2016-11-30 Thread Andreas Karlsson
On 12/01/2016 02:48 AM, Andres Freund wrote: It appears openssl has removed the public definition of EVP_CIPHER_CTX leading to pgcrypto failing with: Yes, I believe this is one of the changes in OpenSSL 1.1. I guess you might be the first one to try to compile with 1.1 since 5ff4a67f63fd6d3eb

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2016-12-01 Thread Andreas Karlsson
On 11/30/2016 06:52 AM, Michael Paquier wrote: On Mon, Nov 28, 2016 at 2:01 PM, Michael Paquier Looking at the latest patch at code-level, there is some refactoring to introduce initialize_context(). But it is actually not necessary (perhaps this is the remnant of a past version?) as be_tls_init

Re: [HACKERS] pg_sequence catalog

2016-12-01 Thread Andreas Karlsson
I think this patch looks good now so I am setting it to ready for committer. I like the idea of the patch and I think that while this change will break some tools which look at the sequence relations I think the advantages are worth it (for example making more sequence DDL respecting MVCC).

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2016-12-04 Thread Andreas Karlsson
On 12/04/2016 02:12 PM, Michael Paquier wrote: One last thing that I think is missing in this patch is for users the possibility to check via SQL if the SSL context is actually loaded or not. As the context is reloaded after all the new values are available, with the current patch users may see t

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2016-12-04 Thread Andreas Karlsson
On 12/04/2016 03:20 PM, Michael Paquier wrote: On Sun, Dec 4, 2016 at 11:11 PM, Andreas Karlsson wrote: On 12/04/2016 02:12 PM, Michael Paquier wrote: One last thing that I think is missing in this patch is for users the possibility to check via SQL if the SSL context is actually loaded or

Re: [HACKERS] Why does plpython delay composite type resolution?

2016-12-20 Thread Andreas Karlsson
On 12/21/2016 04:14 AM, Jim Nasby wrote: Why do functions that accept composite types delay type resolution until execution? I have a naive patch that speeds up plpy.execute() by 8% by caching interred python strings for the dictionary key names (which are repeated over and over). The next step i

Re: [HACKERS] pg_sequence catalog

2017-01-03 Thread Andreas Karlsson
On 01/03/2017 03:30 PM, Peter Eisentraut wrote: On 1/3/17 7:23 AM, Kuntal Ghosh wrote: The regression tests for hot standby check fails since it uses the following statement: -select min_value as sequence_min_value from hsseq; which is no longer supported I guess. It should be modified as follow

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2017-01-04 Thread Andreas Karlsson
On 01/04/2017 03:48 PM, Magnus Hagander wrote: On Wed, Jan 4, 2017 at 3:47 PM, Tom Lane That means storing the pass phrase in the memory of the postmaster, which does not sound like a terribly good idea to me, but I have never used keys with pass phrases for daemons so it might be a common so

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2017-01-04 Thread Andreas Karlsson
On 01/04/2017 04:14 PM, Stephen Frost wrote: * Andreas Karlsson (andr...@proxel.se) wrote: A possible solution might be to only add the error throwing hook when loading certificates during SIGHUP (and at Windows) and to work as before on startup. Would that be an acceptable solution? I could

Re: [HACKERS] 2016-03 Commitfest

2016-04-11 Thread Andreas Karlsson
On 04/11/2016 01:35 PM, David Steele wrote: I've marked this committed so the 2016-03 CF is now complete! Thanks to you and everyone else involved in running this CF. You did an excellent job. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] Refactor pg_dump as a library?

2016-04-14 Thread Andreas Karlsson
On 04/14/2016 12:22 PM, Craig Ringer wrote: I'd find a pg_get_tabledef(...) built-in function more interesting for this particular purpose than pg_dump as a library would be. We already have pg_get_viewdef(...), pg_get_functiondef(...) etc. I am personally not a fan of the pg_get_Xdef() functio

Re: [HACKERS] Refactor pg_dump as a library?

2016-04-16 Thread Andreas Karlsson
On 04/14/2016 07:28 PM, David Steele wrote: As far as I know pg_dump share locks everything before it starts so there shouldn't be issues with concurrent DDL. Try creating a new inherited table with FKs, etc. during a pg_dump and you'll see lots of fun lock waits. I am pretty sure that it does

Re: [HACKERS] Wire protocol compression

2016-04-21 Thread Andreas Karlsson
On 04/21/2016 03:04 PM, Aleksander Alekseev wrote: I guess since the usual answer for compression was "use what SSL provides you for free", it's rather unlikely that someone bothered to make a proxy just for that purpose, and really, a proxy is just another moving part in your setup: not everyone

Re: [HACKERS] Can we improve this error message?

2016-04-25 Thread Andreas Karlsson
On 04/17/2016 09:28 PM, Bill Moran wrote: If you have a single line in the pg_hba.conf: hostssl all all 0.0.0.0/0 md5 Attempting to log in with an incorrect password results in an error message about there not being a pg_hba.conf entry for the user. Reading carefully, the error message states

[HACKERS] Accidentally parallel unsafe functions

2016-04-29 Thread Andreas Karlsson
ignore that one if you like. Affected functions: - json_populate_record() - json_populate_recordset() - jsonb_insert() - jsonb_set() - make_interval() - parse_ident() - Loads of conversion functions Andreas commit 9afcc5f1ed22be18d69dc0b70a0f057a023cc5ec Author: Andreas Karlsson Date: Fri

Re: [HACKERS] Accidentally parallel unsafe functions

2016-04-29 Thread Andreas Karlsson
On 04/30/2016 01:19 AM, Tom Lane wrote: Alvaro Herrera writes: Surely CREATE OR REPLACE should keep whatever the flag was, rather than ovewrite it with a bogus value if not specified? In other words IMO the CREATE OR REPLACE code needs changing, not system_views.sql. Absolutely not! The def

Re: [HACKERS] Accidentally parallel unsafe functions

2016-05-04 Thread Andreas Karlsson
On 05/03/2016 08:45 PM, Robert Haas wrote: Committed all of this except for the bit about pg_start_backup, for which I committed a separate fix. Thanks, and really good that you spotted the pg_start_backup() issue. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

[HACKERS] Improve BEGIN tab completion

2016-05-18 Thread Andreas Karlsson
Hi, I noticed that the tab completion was not aware of that TRANSACTION/WORK is optional in BEGIN, and that we do not complete [NOT] DEFERRABLE. While fixing it I also improved the completion support for SET SESSION slightly. Andreas diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/t

[HACKERS] Parallel safety tagging of extension functions

2016-05-19 Thread Andreas Karlsson
Hi, I have gone through all our extensions and tried to tag all functions correctly according to their parallel safety. I also did the same for the aggregate functions in a second patch, and for min(citext)/max(citext) set a COMBINEFUNC. The changes for the functions is attached as one huge

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Andreas Karlsson
On 05/20/2016 11:45 PM, Michael Paquier wrote: Yes, I agree. By the way, the patch completely ignores the fact that some of the modules already had a version bump in the 9.6 development cycle, like pageinpect. You don't need to create a new version script in such cases. I assumed this was too l

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Andreas Karlsson
Another question which I thought of is what we should do with functions like pg_file_write() in adminpack. While it is perfectly fine to modify files from the parallel workers, a user could get race conditions if he tries to modify the same file multiple times. Is this a kind of problem the PA

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-21 Thread Andreas Karlsson
On 05/21/2016 11:45 AM, Tom Lane wrote: Yes, let's fix it. This will also take care of the questions about whether the GIN/GIST opclass tweaks I made a few months ago require module version bumps. Do you have any idea what the best way to add these tweaks to the upgrade scripts would be? My

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-24 Thread Andreas Karlsson
On 05/25/2016 02:34 AM, Robert Haas wrote: On Fri, May 20, 2016 at 11:45 PM, Michael Paquier wrote: Sounds to me that this is part of the cleanup of a 9.6 feature and should be in that release. Yes, I agree. By the way, the patch completely ignores the fact that some of the modules already ha

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-24 Thread Andreas Karlsson
On 05/25/2016 02:41 AM, Robert Haas wrote: On Thu, May 19, 2016 at 5:50 PM, Andreas Karlsson wrote: - How should we modify the aggregate functions when upgrading extensions? ALTER AGGREGATE cannot change COMBINEFUNC or PARALLEL. My current patch updates the system catalogs directly, which

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-24 Thread Andreas Karlsson
On 05/25/2016 03:09 AM, Robert Haas wrote: On Tue, May 24, 2016 at 8:41 PM, Robert Haas wrote: - Do you think we should add PARALLEL UNSAFE to the functions which we know are unsafe to make it obvious that it is intentional? That seems likely unnecessary churn from here. A general point her

Re: [HACKERS] Parallel safety tagging of extension functions

2016-05-30 Thread Andreas Karlsson
On 05/25/2016 03:37 AM, Tom Lane wrote: Andreas Karlsson writes: Ok, then I can avoid touching all functions which are only called by operator classes, tsearch, pls, fdws, etc. Which also means that there is no need to care about Tom's changes to the signatures of GIN and GiST su

Re: [HACKERS] IPv6 link-local addresses and init data type

2016-05-30 Thread Andreas Karlsson
On 05/31/2016 02:37 AM, Haribabu Kommi wrote: The following is the content of IPV6 representation from RFC 4007 The following addresses fe80::1234 (on the 1st link of the node) ff02::5678 (on the 5th link of the node) ff08::9abc (on the 10th organizatio

Re: [HACKERS] IPv6 link-local addresses and init data type

2016-05-31 Thread Andreas Karlsson
On 05/31/2016 04:06 AM, Tom Lane wrote: Andreas Karlsson writes: On 05/31/2016 02:37 AM, Haribabu Kommi wrote: The % delimiter character is not only used at the end of the IPV6 address, from the RFC document, it is possible as follows also. fe80::%2/64 we need to handle both the scenarios

Re: [HACKERS] Binary I/O for isn extension

2016-05-31 Thread Andreas Karlsson
Hi, Thanks for the patch, you can add it to our commitfest app so it gets reviewed in the next commitfest. https://commitfest.postgresql.org/ A suggestion to make it easier for your patch to be accepted: When adding new functions to an extension you need to bump the version of the extension

Re: [HACKERS] PATCH: Reducing lock strength of trigger and foreign key DDL

2015-01-22 Thread Andreas Karlsson
ndres. -- Andreas Karlsson diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index a0d6867..fc86224 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -908,9 +908,9 @@ ERROR: could not serialize access due to read/write dependencies among transact -

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-01-22 Thread Andreas Karlsson
e to 1 if the system has the type `__int128_t'. */ +#undef HAVE___INT128_T + +/* Define to 1 if the system has the type `__uint128_t'. */ +#undef HAVE___UINT128_T pg_config.h.win32 should be updated as well. Will be fixed in the next version. -- Andreas Karlsson -- Sent via pgsql-hackers mai

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-01-22 Thread Andreas Karlsson
, there are still some places with int16 which I am not sure what to do with. A remaining issue is what estimate we should pick for the size of the aggregate state. This patch uses the size of the int128 version for the estimate, but I have no strong opinions on which we should use. -- Andreas

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-01-26 Thread Andreas Karlsson
On 01/23/2015 02:58 AM, Petr Jelinek wrote: On 23/01/15 00:40, Andreas Karlsson wrote: - Renamed some things from int12 to int128, there are still some places with int16 which I am not sure what to do with. I'd vote for renaming them to int128 too, there is enough C functions that user

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-01-27 Thread Andreas Karlsson
On 01/27/2015 09:05 AM, Andres Freund wrote: On 2015-01-27 08:21:57 +0100, Andreas Karlsson wrote: On 01/23/2015 02:58 AM, Petr Jelinek wrote: On 23/01/15 00:40, Andreas Karlsson wrote: - Renamed some things from int12 to int128, there are still some places with int16 which I am not sure what

Re: [HACKERS] PATCH: Reducing lock strength of trigger and foreign key DDL

2015-01-30 Thread Andreas Karlsson
On 01/30/2015 07:48 AM, Michael Paquier wrote: Ok, so the deal is to finally reduce the locks to ShareRowExclusiveLock for the following commands : - CREATE TRIGGER - ALTER TABLE ENABLE/DISABLE - ALTER TABLE ADD CONSTRAINT Correct. I personally still find this useful enough to justify a patch.

Re: [HACKERS] Release note bloat is getting out of hand

2015-02-02 Thread Andreas Karlsson
ls as long as they are still on the website. -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] PATCH: Reducing lock strength of trigger and foreign key DDL

2015-02-06 Thread Andreas Karlsson
On 02/06/2015 08:16 AM, Michael Paquier wrote: On Fri, Jan 30, 2015 at 10:26 PM, Andreas Karlsson wrote: On 01/30/2015 07:48 AM, Michael Paquier wrote: Looking at the latest patch, it seems that in AlterTableGetLockLevel@tablecmds.c we ought to put AT_ReAddConstraint, AT_AddConstraintRecurse

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-02-16 Thread Andreas Karlsson
On 02/13/2015 02:07 PM, Michael Paquier wrote: Andreas, are you planning to continue working on this patch? Peter has provided some comments that are still unanswered. Yes, but I am quite busy right now. I will try to find time some time later this week. -- Andreas Karlsson -- Sent via

[HACKERS] Fix autoconf deprecation warnings

2015-02-25 Thread Andreas Karlsson
e use of the AC_LANG_* macros they were easy to remove. -- Andreas Karlsson >From 16749732d28a027f0704784eaf180ed916c8511f Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Thu, 12 Feb 2015 23:55:01 +0100 Subject: [PATCH 1/4] Replace obsolete macros AC_TRY_* with AC_*_IFELSE. The AC_TRY_

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-04 Thread Andreas Karlsson
On 01/29/2015 12:28 AM, Peter Geoghegan wrote: On Mon, Jan 26, 2015 at 11:21 PM, Andreas Karlsson wrote: Do you also think the SQL functions should be named numeric_int128_sum, numeric_int128_avg, etc? Some quick review comments. These apply to int128-agg-v5.patch. * Why is there no

Re: [HACKERS] BRIN range operator class

2015-03-07 Thread Andreas Karlsson
gies are also missing. SELECT * FROM bar WHERE i = '::1'; - I do not think this comment is true "Used to determine the addresses have a common union or not". It actually checks if we can create range which contains both ranges. - Compact random spaces in "select nu

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-09 Thread Andreas Karlsson
On 03/07/2015 07:18 PM, Petr Jelinek wrote: What I am wondering is if those numeric_int16_* functions that also deal with either the Int128AggState or NumericAggState should be renamed in similar fashion. You mean something like numeric_poly_sum instead of numeric_int16_sum? I personally am n

Re: [HACKERS] New functions

2015-03-09 Thread Andreas Karlsson
On 03/08/2015 08:14 PM, Dmitry Voronin wrote: What do you think about it? Nice to see you back working on the patch. For reviewers: the previous discussion and review of the patch can be found at http://www.postgresql.org/message-id/53a88911.6060...@proxel.se. -- Andreas Karlsson -- Sent

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-09 Thread Andreas Karlsson
On 03/03/2015 04:14 PM, Julien Tachoires wrote: On 30/12/2014 03:48, Andreas Karlsson wrote: - A test fails in create_view.out. I looked some into it and did not see how this could happen. [...] I can't reproduce this issue. Neither can I anymore. - pg_dump is broken pg

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-09 Thread Andreas Karlsson
On 03/03/2015 04:14 PM, Julien Tachoires wrote: Sorry for the delay, I missed this thread. Here is a new version of this patch considering Andreas' comments. Please also add it to the next open commitfest so we do not lose the patch. -- Andreas Karlsson -- Sent via pgsql-hackers ma

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-09 Thread Andreas Karlsson
numeric_int16_* to numeric_poly_* - Rename static functions int{8,16}_to_numericvar to int{64,128}_to_numericvar - Fix typo in c-compile.m4 comment -- Andreas Karlsson diff --git a/config/c-compiler.m4 b/config/c-compiler.m4 index 509f961..48fcc68 100644 --- a/config/c-compiler.m4 +++ b/config/c

Re: [HACKERS] Reducing lock strength of adding foreign keys

2014-12-13 Thread Andreas Karlsson
CONCURRENTLY case. By the way, unless I am mistaken there is currently no protection against having a concurrent ALTER FUNCTION ... RENAME mess up what is dumped in by pg_get_triggerdef(). -- Andreas Karlsson -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

<    1   2   3   4   >