[HACKERS] Tab completion for ALTER ... SET SCHEMA

2010-12-17 Thread andreas
;SCHEMA") == 0) + COMPLETE_WITH_QUERY(Query_for_list_of_schemas); + + /* BEGIN, END, ABORT */ else if (pg_strcasecmp(prev_wd, "BEGIN") == 0 || pg_strcasecmp(prev_wd, "END") == 0 || Regards, Andreas Karlsson -- Sent via pgsql

Re: [HACKERS] Relax table alias conflict rule in 9.3?

2013-11-12 Thread Andreas
regards, tom lane Great! :) This change would help me upgrade to 9.3x because I've got lots of views that use a table alias that gets rejected by 9.3 while restoring the dump of 9.2. When do you plan to have it in an official release? Cheers Andreas -- Sent via pgsql-

[HACKERS] "truncate all"?

2003-08-04 Thread Andreas
Hi! Would it be possible to implement a "truncate all" that purges all tuples from *all* tables, without taking account any rules or triggers, but leaving all table structures and rules, triggers, functions, etc intact (sequences do not need to reinitialized)? As far as I understand, the "no

Re: [HACKERS] "truncate all"?

2003-08-05 Thread Andreas
Hi there, > I agree with Tom ... even the idea of a "TRUNCATE ALL" makes me nervous. If > we had such a feature, I'd advocate that it be superuser only. This "superuser only" restriction certainly would be sensible. > As for "TRUNCATE CASCADE" or similar improvements, I agree that they could be

Re: [HACKERS] "truncate all"?

2003-08-14 Thread Andreas
Hi there, At 17:55 05.08.2003, Josh Berkus wrote: > Another way to specify a safe but efficient "TRUNCATE ALL" command that > might be easier to implement than above "TRUNCATE table > [CASCADE|RESTRICT]" might be to implement the functionality of the > originally suggested "TRUNCATE ALL" through

Re: [HACKERS] Submit Pull Request

2016-03-03 Thread Andreas Karlsson
ute to the pgrpms. Andreas -- 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] syslog configurable line splitting behavior

2016-03-08 Thread Andreas Karlsson
ot think it is worth it to expose PG_SYSLOG_LIMIT as a GUC. Andreas -- 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] syslog configurable line splitting behavior

2016-03-08 Thread Andreas Karlsson
On 03/09/2016 03:20 AM, Peter Eisentraut wrote: On 3/8/16 9:12 PM, Andreas Karlsson wrote: As someone who uses syslog for my servers I find both of these GUCs useful, especially when used in combination, and I do not think a compile time option like suggest by Alexander would be suitable

Re: [HACKERS] Is there a way around function search_path killing SQL function inlining?

2016-03-08 Thread Andreas Karlsson
by the function which changed the search path. Andreas -- 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] NOT LIKE index support

2016-03-15 Thread Andreas Karlsson
er to prefer doing a sequential scan. And your examples above seem like they would match most rows in the table, making an index scan rarely worth it. We do not have support for indexing the <> operator either for btree indexes. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hacke

Re: [HACKERS] syslog configurable line splitting behavior

2016-03-16 Thread Andreas Karlsson
On 03/16/2016 03:50 AM, Peter Eisentraut wrote: On 3/8/16 9:12 PM, Andreas Karlsson wrote: I have one nitpick: why is one of the variables "true" while the other is "on" in the example? I think both should be "on". #syslog_sequence_numbers = true #syslog_spli

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-18 Thread Andreas Karlsson
ally not a fan of seeing the "isorderby == false && index->rd_amroutine->amcanorclause" clause twice. Feels like a risk for diverging code paths. But it could be that there is no clean alternative. Andreas -- 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] 2016-03 Commitfest

2016-03-18 Thread Andreas Karlsson
Hi, The COPY RAW patch seems to have two entries in the commitfest. https://commitfest.postgresql.org/9/223/ and https://commitfest.postgresql.org/9/547/ Are those about the same patch? Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] [PROPOSAL] Add SCTP network protocol to postgresql backend and frontend

2016-03-23 Thread Andreas Karlsson
case in mind? Andreas -- 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] [PROPOSAL] Add SCTP network protocol to postgresql backend and frontend

2016-03-23 Thread Andreas Karlsson
On 03/23/2016 02:13 PM, Alvaro Herrera wrote: Andreas Karlsson escribió: On 03/23/2016 01:55 PM, Eduardo Morras wrote: Benefits: Dynamic multihoming, modifiable at run time, don't need aggregate links at OS level or shutdown servers/clients for a hardware or topology network change. Me

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-24 Thread Andreas Karlsson
ion poolers with prepared statement support, e.g. sequel for Ruby, does not need any special support from PostgreSQL and work just fine with our current feature set. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://ww

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-24 Thread Andreas Karlsson
not a complete solution, but it solves the problems of many users. I think even just supporting the protocol level prepare and execute commands would be enough for many of those who have problems with pgbouncer. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

[HACKERS] [PATCH] Improve spinlock inline assembly for x86.

2016-01-17 Thread Andreas Seltenreich
XCHG instruction. Locking is implicit | with XCHG and the prefix wastes a byte. Also remove the "cc" register | from the clobber list as the XCHG instruction does not modify any flags. | | Reported by Christoph Mallon. ` regards, Andreas >From c836b4f3e0b60d070481d4061e6fe0ffbe48849

Re: [HACKERS] COPY (... tab completion

2016-01-18 Thread Andreas Karlsson
the parentheses is documented to be: SELECT, VALUES, INSERT, UPDATE or DELETE; and actually TABLE should also work. Your list doesn't include all of those. So please adjust that. Fixed. And TABLE works too. Andreas commit 3b7a808e710e613f81abd0207847a3378ec3192c Author: Andreas K

Re: [HACKERS] COPY (... tab completion

2016-01-18 Thread Andreas Karlsson
On 01/19/2016 01:57 AM, Andreas Karlsson wrote: Thanks for the review. A new version is attached. Whops, attached the wrong file. Andreas diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index ad8a580..bc80ed0 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-18 Thread Andreas Karlsson
in 9.2 and I failed when trying to reproduce it on master. - Also complete RENAME TO in ALTER FOREIGN DATA WRAPPER. Done. - Also complete OPTIONS in FOREIGN DATA WRAPPER and SERVER commands. Done. Andreas diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index c3c77b

Re: [HACKERS] COPY (... tab completion

2016-01-19 Thread Andreas Karlsson
quot;, "INSERT", "UPDATE", "DELETE", "WITH"); This one should be Matches, no? Yep, fixed. Andreas diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 5a11c61..72e0255 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/t

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-25 Thread Andreas Karlsson
On 01/23/2016 01:03 PM, Peter Eisentraut wrote: committed Thanks! Andreas -- 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] Generalizing SortSupport for text to work with char(n), bytea, and alternative opclasses

2016-01-31 Thread Andreas Karlsson
like the handling is much more complicated than it actually is. I did not understand it after a couple of readings and had to read the code understand what it was talking about. Nice work, I like your sorting patches. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

Re: [HACKERS] UNIQUE capability to hash indexes

2016-02-04 Thread Andreas Karlsson
e splitting of buckets. http://www.postgresql.org/message-id/ca+tgmozymojsrfxhxq06g8jhjxqcskvdihb_8z_7nc7hj7i...@mail.gmail.com Andreas -- 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] OpenSSL 1.1 breaks configure and more

2016-08-26 Thread Andreas Karlsson
such check currently. Andreas diff --git a/contrib/pgcrypto/openssl.c b/contrib/pgcrypto/openssl.c index 976af70..ffab5d2 100644 --- a/contrib/pgcrypto/openssl.c +++ b/contrib/pgcrypto/openssl.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -47,155 +48,6 @@ #

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-08-29 Thread Andreas Karlsson
On 08/29/2016 07:22 PM, Heikki Linnakangas wrote: Pushed with some small doc fixes, thanks Andreas! I'll continue reviewing the rest of the patches. Thanks! Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-08-29 Thread Andreas Karlsson
On 08/26/2016 11:31 AM, Heikki Linnakangas wrote: On 07/05/2016 04:46 PM, Andreas Karlsson wrote: @@ -280,8 +287,9 @@ px_find_digest(const char *name, PX_MD **res) digest = px_alloc(sizeof(*digest)); digest->algo = md; -EVP_MD_CTX_init(&digest->ctx); -if (EVP_Dig

Re: [HACKERS] Improve BEGIN tab completion

2016-09-02 Thread Andreas Karlsson
On 09/01/2016 11:28 PM, Kevin Grittner wrote: On Wed, May 18, 2016 at 8:59 AM, Andreas Karlsson wrote: 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

[HACKERS] [sqlsmith] Failed assertion in numeric aggregate

2016-09-03 Thread Andreas Seltenreich
in the coredumps, it looks like set_var_from_num() is invoked on an uninitialized NumericVar. Sample gdb session below. Below is also one of the generated queries that eventually triggers it for me when invoked a dozen times or so. regards, Andreas --8<---cut here---start--

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

2016-09-04 Thread Andreas Karlsson
On 08/31/2016 11:34 PM, Peter Geoghegan wrote: On Sun, Nov 22, 2015 at 7:29 PM, Andreas Karlsson wrote: Sorry for dropping this patch, but now I have started looking at it again. Any chance of picking this up again soon, Andreas? I think it's an important project. I would like to revi

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-09-04 Thread Andreas Karlsson
//www.postgresql.org/message-id/561274f1.1030...@iki.fi). I dropped the ball back then, but I think I'll go ahead and do that now, once we get these other OpenSSL changes in. Nice! Andreas >From 0afeb5e075028339f28c2c2d7b407c1bcc85c4be Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Da

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-09-04 Thread Andreas Karlsson
sure about if anything of the other patches should be backpatched. Andreas -- 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] OpenSSL 1.1 breaks configure and more

2016-09-14 Thread Andreas Karlsson
this touches. This patch no longer seems to apply to head after the removed support of 0.9.6. Is that intentional? Andreas -- 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] OpenSSL 1.1 breaks configure and more

2016-09-14 Thread Andreas Karlsson
On 09/15/2016 02:03 AM, Andreas Karlsson wrote: On 09/12/2016 06:51 PM, Heikki Linnakangas wrote: Changes since last version: * Added more error checks to the my_BIO_s_socket() function. Check for NULL result from malloc(). Check the return code of BIO_meth_set_*() functions; looking at

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-09-15 Thread Andreas Karlsson
. Not sure if we need this, but if we do we can apply this patch. Andreas diff --git a/configure b/configure index 6c6c08d..9470ed1 100755 --- a/configure +++ b/configure @@ -8621,9 +8621,9 @@ else as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO&

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-09-17 Thread Andreas Karlsson
sure I follow what the old code in 9.3 and 9.2 is strying to do and why it messes directly with the state of the statemachine. Andreas -- 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] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Andreas Seltenreich
one earlier. regards, Andreas -- 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] parallel worker (PID ) exited with exit code 1

2017-10-07 Thread Andreas Seltenreich
aintained then: https://github.com/anse1/sqlsmith. I am > adding as well Andreas in CC, he works on sqlsmith. Blacklisting when testing with sqlsmith typically happens on the error logging side: Logging into a database via --log-to with the schema shipped with sqlsmith filters out boring error mes

[HACKERS] [sqlsmith] Failed assertion in adjust_appendrel_attrs_mutator

2017-10-22 Thread Andreas Seltenreich
EXISTS ( select public.road.name as c1, ref_1.with_check as c3, ref_2.b as c6 from public.itest4 as ref_2)); --8<---cut here---end--->8--- Backtrace below. regards, Andre

Re: [HACKERS] Discussion on missing optimizations

2017-10-22 Thread Andreas Seltenreich
tion than adding a blacklisting/whitelisting feature and let the user do the hard work… If these are solved though, one could make multiple runs with the same random seed and query the logging database for differences in the result descriptions. regards, Andreas -- Sent via pgsql-hackers mailing

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-10-29 Thread Andreas Karlsson
gml/ref/create_table.sgml which starts with "In case the column name" seems to actually be multiple paragraphs. Is that intentional or a mistake? The documentation in doc/src/sgml/ddl.sgml mentions that "it must be written in table constraint form" for when you have m

Re: [HACKERS] git down

2017-10-29 Thread Andreas Karlsson
case https://git.postgresql.org/gitweb/?p=postgresql.git;a=summary should not advertise supporting the git protocol. I have not seen any announcement either, but that could just be me not paying enough attention. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-10-31 Thread Andreas Karlsson
Here is a rebased version of the patch. Andreas diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index a0ca2851e5..f8c59ea127 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -926,6 +926,7 @@ ERROR: could not serialize access due to read/write dependencies among

Re: [HACKERS] GnuTLS support

2017-11-02 Thread Andreas Karlsson
: - sslinfo - pgcrypto - Documentation - Decide if what I did with the config is a good idea Andreas diff --git a/configure b/configure index 4ecd2e1922..1ba34dfced 100755 --- a/configure +++ b/configure @@ -709,6 +709,7 @@ UUID_EXTRA_OBJS with_uuid with_systemd with_selinux +with_gnutls with_openssl

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-11-12 Thread Andreas Karlsson
i_triggers.o' failed When building the documentation I got two warnings: /usr/bin/osx:catalogs.sgml:2349:17:W: empty end-tag /usr/bin/osx:catalogs.sgml:2350:17:W: empty end-tag When running the tests I got a failure in element_foreign_key. Andreas -- Sent via pgsql-hackers mailing l

[HACKERS] [sqlsmith] Infinite recursion in bitshift

2016-10-14 Thread Andreas Seltenreich
Hi, sqlsmith just found another crasher: select bit '1' >> (-2^31)::int; This is due to an integer overflow in bitshiftright()/bitshiftleft() leading to them recursively calling each other. Patch attached. regards, Andreas >From cfdc425f75da268e1c2af08f936c59f34b69e577

Re: [HACKERS] [sqlsmith] Infinite recursion in bitshift

2016-10-14 Thread Andreas Seltenreich
tween those two. -INT_MAX might be a more precise fix for the problem, but the extra distance to the danger zone was kind of soothing :-). regards, Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] [sqlsmith] Missing CHECK_FOR_INTERRUPTS in tsquery_rewrite

2016-10-29 Thread Andreas Seltenreich
foo'); The attached patch adds a CHECK_FOR_INTERRUPTS to make it cancellable. regards, Andreas >From d9910a96c9bd73c16e29ecaa0577945d5e1c091c Mon Sep 17 00:00:00 2001 From: Andreas Seltenreich Date: Sun, 30 Oct 2016 03:25:55 +0100 Subject: [PATCH] Add CHECK_FOR_INTERRUPTS in tsquery_rewrite lo

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

2016-10-31 Thread Andreas Karlsson
I have attached a version of the patch rebased on top of the OpenSSL 1.1 changes. Andreas diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 668f217..a1b582f 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure

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

2016-11-06 Thread Andreas Karlsson
rns out we had a secure_destroy() in the ancient past, but its implementation got removed in 2008 in 4e8162865 as there were no (more) users of it, however, the declaration was kept on until now. So this hunk should be removed I guess. Removed. Andreas diff --git a/doc/src/sgml/runtime.sgml b

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

2016-11-08 Thread Andreas Karlsson
again for the review! Andreas -- 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] pg_sequence catalog

2016-11-08 Thread Andreas Karlsson
the name of the lastval1() function. = Documentation - The documentation does not mention the last_value column. - The extra empty line after "" does not fit with the formatting of the rest of the SGML file. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

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

2016-11-09 Thread Andreas Karlsson
useful to not bail on hostssl. What do you think? I will look into writing a cleaner patch for ServerSetup.pm some time later this week. Andreas -- 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] pg_sequence catalog

2016-11-09 Thread Andreas Karlsson
On 11/10/2016 05:29 AM, Peter Eisentraut wrote: On 11/8/16 6:43 PM, Andreas Karlsson wrote: - A worry is that it might get a bit confusing to have both the future catalog pg_sequence and the view pg_sequences. We already have this in other cases: pg_index/pg_indexes, pg_user_mapping

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

2016-11-10 Thread Andreas Karlsson
On 11/10/2016 07:16 AM, Michael Paquier wrote: On Wed, Nov 9, 2016 at 7:46 PM, Andreas Karlsson wrote: Those tests fail due to that listen_addresses cannot be changed on reload so none of the test cases can even connect to the database. When I hacked ServerSetup.pm to set the correct

Re: [HACKERS] pg_sequence catalog

2016-11-11 Thread Andreas Karlsson
On 11/10/2016 06:27 AM, Andreas Karlsson wrote: On 11/10/2016 05:29 AM, Peter Eisentraut wrote: On 11/8/16 6:43 PM, Andreas Karlsson wrote: - Shouldn't last_value be NULL directly after we have created the sequence but nobody has called nextval() yet? - I noticed that last_value include

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

2016-11-11 Thread Andreas Karlsson
Hi, 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 2) Rebased on master Please take a look. Andreas diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 787cfce..5e78d81 100644 --- a/doc

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

2016-11-11 Thread Andreas Karlsson
On 11/11/2016 07:40 PM, Andreas Karlsson wrote: Hi, 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 2) Rebased on master And here with a fix to a comment. Andreas diff --git a/doc/src/sgml/runtime.sgml b

Re: [HACKERS] pg_sequence catalog

2016-11-11 Thread Andreas Karlsson
here to put this as a "else if" just like "relKind == RELKIND_INDEX". = Documentation The patch does not update catalogs.sgml which it should do. Andreas diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index ee1f673..a272ad3 100644 --- a/src/bin/pg_dump/pg_

Re: [HACKERS] Contains and is contained by operators of inet datatypes

2016-11-11 Thread Andreas Karlsson
er. - Won't renaming the functions which implement risk breaking people's applications? While the new names are a bit nicer I am not sure it is worth doing. - The changes to the code look generally good. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgr

Re: [HACKERS] Contains and is contained by operators of inet datatypes

2016-11-13 Thread Andreas Karlsson
On 11/13/2016 01:21 PM, Emre Hasegeli wrote: Thank you for the review. New version is attached. Nice, I am fine with this version of the patch. Setting it to ready for committer! Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

[HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Andreas Seltenreich
_mode to on; begin; select set_config('foo.baz', null, b) from (values (false), (true)) g(b); commit; select 1; --8<---cut here---end------->8--- regards, Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Andreas Seltenreich
Michael Paquier writes: > [2. text/plain; fix-guc-string-eval.patch] I'm afraid taking care of the length computation is not sufficient. ISTM like it'll still try to serialize the NULL pointer later on in serialize_variable: ,[ guc.c:9108 ] | case PGC_STRING: | { | struct config_st

[HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-20 Thread Andreas Seltenreich
ontext from pg_opclass limit 1) as subq limit 1; --8<---cut here---end--->8--- Backtrace of a worker below. regards, Andreas Core was generated by `postgres: bgworker: parallel worker for PID 27448'. Program terminated with signal SIGSEGV, Segme

[HACKERS] [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan

2016-11-20 Thread Andreas Seltenreich
Hi, the query below triggers a parallel worker assertion for me when run on the regression database of master as of 0832f2d. The plan sports a couple of InitPlan nodes below Gather. regards, Andreas Gather (cost=1.64..84.29 rows=128 width=4) Workers Planned: 1 Single Copy: true

Re: [HACKERS] Contains and is contained by operators of inet datatypes

2016-11-21 Thread Andreas Karlsson
votes from multiple people. Given that I reviewed it I think you already have my vote on this. I like the patch because it means less operators to remember for me as a PostgreSQL user. And at least for me inet is a rarely used type compared to hstore, json and range types which all use @>

Re: [HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-21 Thread Andreas Seltenreich
arallel_setup_cost and parallel_tuple_cost to 0. I assumed these were irrelevant when force_parallel_mode is on. I'll do less assuming and more testing on a vanilla install on future reports. Sorry for the inconvenience, Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgres

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-02-17 Thread Andreas Karlsson
On 02/14/2017 04:56 AM, Michael Paquier wrote: On Tue, Feb 14, 2017 at 11:32 AM, Andreas Karlsson wrote: On 02/13/2017 06:31 AM, Michael Paquier wrote: Er, something like that as well, no? DETAIL: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s. REINDEX (VERBOSE) currently prints one

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-02-17 Thread Andreas Karlsson
On 02/17/2017 01:53 PM, Andreas Karlsson wrote: I am actually thinking about going the opposite direction (by reducing the number of times we call WaitForLockers), because it is not just about consuming transaction IDs, we also do not want to wait too many times for transactions to commit. I am

[HACKERS] Question about memory contexts in ReindexMultipleTables()

2017-02-17 Thread Andreas Karlsson
memory context be removed, or should we switch to TopTransactionContext at the begining of ReindexMultipleTables() so temporary resources used in the initial transaction can be freed? Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Disallowing multiple queries per PQexec()

2017-02-28 Thread Andreas Karlsson
4 Protocol section or removed? A new protocol version wont solve the breakage of the C API, so I am not sure we can ever drop this feature other than by adding a new function something in the protocol to support this. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgres

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-02-28 Thread Andreas Karlsson
ns we change each index from invalid to dead. 6. After waiting for all running transactions we drop each index. 7. Drop all session locks. Andreas diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 306def4a15..ca1aeca65f 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-02 Thread Andreas Karlsson
On 03/02/2017 02:25 AM, Jim Nasby wrote: On 2/28/17 11:21 AM, Andreas Karlsson wrote: The only downside I can see to this approach is that we no logner will able to reindex catalog tables concurrently, but in return it should be easier to confirm that this approach can be made work. Another

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-05 Thread Andreas Karlsson
tabase. Index bloat happens and without REINDEX CONCURRENTLY it can be really annoying to solve, especially for primary keys. Certainly more people have problems with index bloat than the number of people who store index oids in their database. Andreas -- Sent via pgsql-hackers mailing lis

Re: [HACKERS] rename pg_log directory?

2017-03-06 Thread Andreas Karlsson
/var/log, and if you unpack a, say, Kafka or Cassandra distribution, they also come with a log or logs directory. +1, though I am also fine with server_log. Andreas -- 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] rename pg_log directory?

2017-03-06 Thread Andreas Karlsson
Btw, is there a reason for why global and base do not have the "pg_" prefix? Andreas commit 0b71fcdb328f05349775675e0491ba1b82127d4e Author: Andreas Karlsson Date: Mon Mar 6 23:52:49 2017 +0100 Rename default log directory from pg_log to log diff --git a/doc/src/sgml/config.sgml b/d

Re: [HACKERS] adding an immutable variant of to_date

2017-03-06 Thread Andreas Karlsson
pissing too many users off, but I have no idea if this is a view shared with the rest of the community. Andreas -- 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] REINDEX CONCURRENTLY 2.0

2017-03-08 Thread Andreas Karlsson
On 03/08/2017 03:48 AM, Robert Haas wrote: On Sun, Mar 5, 2017 at 7:13 PM, Andreas Karlsson wrote: And I would argue that his feature is useful for quite many, based on my experience running a semi-large database. Index bloat happens and without REINDEX CONCURRENTLY it can be really annoying

Re: [HACKERS] adding an immutable variant of to_date

2017-03-08 Thread Andreas Karlsson
On 03/07/2017 09:56 PM, Sven R. Kunze wrote: On 07.03.2017 03:21, Andreas Karlsson wrote: 1) I do not think we currently allow setting the locale like this anywhere, so this will introduce a new concept to PostgreSQL. And you will probably need to add support for caching per locale. Good to

Re: [HACKERS] rename pg_log directory?

2017-03-10 Thread Andreas Karlsson
hile developing. Fun little tidbit there. Andreas -- 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] REINDEX CONCURRENTLY 2.0

2017-03-12 Thread Andreas Karlsson
On 03/02/2017 03:10 AM, Michael Paquier wrote: On Wed, Mar 1, 2017 at 2:21 AM, Andreas Karlsson wrote: +/* + * Copy contraint flags for old index. This is safe because the old index + * guaranteed uniquness. + */ +newIndexForm->indisprimary = oldIndexForm->indisp

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-12 Thread Andreas Karlsson
On 03/13/2017 03:11 AM, Andreas Karlsson wrote: I also fixed the the code to properly support triggers. And by "support triggers" I actually meant fixing the support for moving the foreign keys to the new index. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@post

Re: [HACKERS] \h tab-completion

2017-03-13 Thread Andreas Karlsson
On 03/13/2017 03:56 PM, David Steele wrote: Do you know when you will have a new patch available for review that incorporates Peter's request? I believe I will find the time to finish it some time in a couple of days. Andreas -- Sent via pgsql-hackers mailing list (pgsql-ha

Re: [HACKERS] ICU integration

2017-03-14 Thread Andreas Karlsson
ill needs doing? /* * Also forbid matching an any-encoding entry. This test of course is not * backed up by the unique index, but it's not a problem since we don't -* support adding any-encoding entries after initdb. +* support adding any-encoding entries after initdb. FIXME */ - Should functions like normalize_locale_name() be renamed to indicate they relate to libc locales? I am leaning towards doing so but have not looked closely at the task. Andreas -- 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] \h tab-completion

2017-03-15 Thread Andreas Karlsson
On 03/01/2017 02:47 PM, Peter Eisentraut wrote: Instead of creating another copy of list_ALTER, let's use the words_after_create list and write a version of create_command_generator/drop_command_generator. Good idea. Here is a patch with that. Andreas c

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-15 Thread Andreas Karlsson
Hi, I got a test failure with this version of the patch in the postges_fdw. It looks to me like it was caused by a typo in the source code which is fixed in the attached patch. After applying this patch check-world passes. Andreas diff --git a/src/backend/executor/nodeTidscan.c b/src

Re: [HACKERS] \h tab-completion

2017-03-16 Thread Andreas Karlsson
On 03/17/2017 12:01 AM, Peter Eisentraut wrote: Committed with some tweaking. Thanks! Andreas -- 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] Removing binaries (was: createlang/droplang deprecated)

2017-03-19 Thread Andreas Karlsson
I'd suggest dropping these too. The value they add is that they quote the database name and options correctly which makes them easier to use safely and reliably in shell scripts. And unless I am missing something obvious I do not think there is any easy way for a beginner to do this

Re: [HACKERS] Removing binaries (was: createlang/droplang deprecated)

2017-03-19 Thread Andreas Karlsson
upgrade. On the flip side I have no idea how much work it would be to maintain those legacy names. Andreas -- 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] ICU integration

2017-03-19 Thread Andreas Karlsson
not a problem since we don't -* support adding any-encoding entries after initdb. +* support adding any-encoding entries after initdb. FIXME */ I had mentioned that upthread. It technically needs "doing" as you say, but it's not clear how and it's not terribly important, arguably. The comment is no longer true since for ICU we can do that (it is not an issue though). At the very least this comment needs to be updated. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Re: [REVIEW] psql tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE

2014-06-17 Thread Andreas Karlsson
nternal is FALSE' to 'Query_for_trigger_of_table' to hide them. Good suggestion. I have attached a patch which filters out the internal triggers, both for ALTER TABLE and DROP TRIGGER. I am not entirely sure about the DROP TRIGGER case but I think I prefer no auto completion of RI tr

Re: [HACKERS] Re: [REVIEW] psql tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE

2014-06-17 Thread Andreas Karlsson
On 06/18/2014 02:34 AM, Ian Barwick wrote: On 14/06/18 7:51, Andreas Karlsson wrote: On 06/17/2014 01:36 PM, Ian Barwick wrote: One issue - the table's internal triggers will also be listed. which can result in something like this: This is a bit of an extreme case, but I don't thin

Re: [HACKERS] New functions in sslinfo module

2014-06-23 Thread Andreas Karlsson
et_extension_names(). - All the "Returns X datum" comments look redundant to me, but this is a matter of preference. - The star when declaring result in ssl_get_extension_names() should be put on the other side of the white space. -- Andreas Karlsson -- Sent via pgsql-hackers mai

Re: [HACKERS] Supporting Windows SChannel as OpenSSL replacement

2014-06-26 Thread Andreas Karlsson
tch. The regression tests pass now on my Debian machine. One thing I noticed when trying to find the bug is that be-secure.c still includes some OpenSSL headers. Those should be removed since they have already been moved to be-secure-openssl.c. -- Andreas Karlsson diff --git a/src/backen

Re: [HACKERS] New functions in sslinfo module

2014-07-02 Thread Andreas Karlsson
any_to_server() is implemented using pg_do_encoding_conversion(). I don't write a code of those functions and I can't answer on your question. Hm, I thought I saw them changed from static to not in the diff after applying your patch. Maybe I just misread the patch. -- Andreas

Re: [HACKERS] ICU integration

2017-03-23 Thread Andreas Karlsson
nk we will just have to accept the weirdness of how ICU handles locales. I think this patch is ready to be committed. Found a typo in the documentation: "The inspect the currently available locales" should be "To inspect the currently available locales". Andreas

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2017-03-23 Thread Andreas Karlsson
rong preference other than that we should avoid breaking pg_dump or changing behavior not related to the database attributes. Andreas -- 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] No more libedit?! - openssl plans to switch to APL2

2017-03-23 Thread Andreas Karlsson
eventually be able to drop their LD_PRELOAD hack, which never worked perfectly due to compiling against libedit or libreadline header resulting in different binaries. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http

[HACKERS] [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint

2017-03-26 Thread Andreas Seltenreich
ucible on a cluster once it happens. I could provide a tarball if needed. regards, Andreas #2 0x008324b1 in ExceptionalCondition (conditionName=conditionName@entry=0x9e4e28 "!(LWLockHeldByMe(((LWLock*) (&(bufHdr)->content_lock", errorType=errorType@entry=0x87b03d

  1   2   3   4   5   6   7   8   9   10   >