[HACKERS] Re[2]: [HACKERS] Re[2]: [HACKERS] Connect from background worker thread to database

2013-11-24 Thread Alexey Vasiliev
Понедельник, 25 ноября 2013, 13:31 +09:00 от Michael Paquier : >On Mon, Nov 25, 2013 at 1:02 PM, Alexey Vasiliev < leopard...@inbox.ru > wrote: >> Thanks, I just try this. This work if I working with database in loop inside >> bgw_main function. But if I create threads inside bgw_main and try to

Re: [HACKERS] Heavily modified big table bloat even in auto vacuum is running

2013-11-24 Thread Amit Kapila
On Fri, Nov 22, 2013 at 12:12 PM, Haribabu kommi wrote: > On 19 November 2013 10:33 Amit Kapila wrote: >> If I understood correctly, then your patch's main intention is to >> correct the estimate of dead tuples, so that it can lead to Vacuum >> cleaning the table/index which otherwise is not happe

Re: [HACKERS] [PoC] pgstattuple2: block sampling to reduce physical read

2013-11-24 Thread firoz e v
On 16/09/13 16:20, Satoshi Nagayasu wrote: > Thanks for checking. Fixed to eliminate SnapshotNow. Looking forward to get a new patch, incorporating the comments, that are already given in the following mails: 1. Jaime Casanova: "The name pgstattuple2, doesn't convince me... maybe you can use p

Re: [HACKERS] UNION ALL on partitioned tables won't use indices.

2013-11-24 Thread Noah Misch
On Sat, Nov 23, 2013 at 01:35:32PM -0500, Tom Lane wrote: > Noah Misch writes: > > I'm unclear on the key ideas behind distinguishing em_is_child members from > > ordinary EC members. src/backend/optimizer/README says "These members are > > *not* full-fledged members of the EquivalenceClass and d

Re: [HACKERS] Re[2]: [HACKERS] Connect from background worker thread to database

2013-11-24 Thread Michael Paquier
On Mon, Nov 25, 2013 at 1:02 PM, Alexey Vasiliev wrote: > Thanks, I just try this. This work if I working with database in loop inside > bgw_main function. But if I create threads inside bgw_main and try to > connect to database - I have errors "stack depth limit exceeded" . The code: > > https://

[HACKERS] Re[2]: [HACKERS] Re[2]: [HACKERS] Connect from background worker thread to database

2013-11-24 Thread Alexey Vasiliev
Понедельник, 25 ноября 2013, 8:31 +09:00 от Michael Paquier : >On Mon, Nov 25, 2013 at 2:10 AM, Alexey Vasiliev < leopard...@inbox.ru > wrote: >> Воскресенье, 24 ноября 2013, 14:06 +01:00 от Andres Freund >> < and...@anarazel.de >: >> >> Hi, >> >> >> On 2013-11-24 16:27:06 +0400, Олексій Васильєв

Re: [HACKERS] COPY table FROM STDIN doesn't show count tag

2013-11-24 Thread Amit Khandekar
On 22 November 2013 16:14, Rajeev rastogi wrote: > On 21 November 2013, Amit Khandekar > wrote: > > >Ok. we will then first fix the \COPY TO issue where it does not revert > back the overriden psql output file handle. Once this is solved, fix for > both COPY FROM and COPY TO, like how it is don

Re: [HACKERS] Re: Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-24 Thread Amit Kapila
On Sun, Nov 24, 2013 at 10:22 PM, Tom Lane wrote: > Amit Kapila writes: >> I think that still this kind of problems can be there at other >> places in code. I checked few places and suspecting secure_read() can >> also have similar problem: > >> case SSL_ERROR_SSL: >> ereport(COMMERROR, >> (err

Re: [HACKERS] TODO: Split out pg_resetxlog output into pre- and post-sections

2013-11-24 Thread Rajeev rastogi
On Sat, Nov 9, 2013, Amit Kapila wrote > On Fri, Nov 8, 2013 at 10:37 AM, Rajeev rastogi > mailto:rajeev.rast...@huawei.com>> wrote: > > On Fri, 08 November 2013 09:47 > > > >> On Tue, Nov 5, 2013 at 3:20 PM, Rajeev rastogi > >> mailto:rajeev.rast...@huawei.com>> wrote: > >> > On execution

Re: [HACKERS] Show lossy heap block info in EXPLAIN ANALYZE for bitmap heap scan

2013-11-24 Thread Amit Khandekar
On 1 November 2013 16:32, Etsuro Fujita wrote: > > From: Fujii Masao [mailto:masao.fu...@gmail.com] > > > This is what I'm looking for! This feature is really useful for tuning > work_mem > > when using full text search with pg_trgm. > > > > I'm not sure if it's good idea to show the number of th

Re: [HACKERS] [PATCH] Use MAP_HUGETLB where supported (v3)

2013-11-24 Thread Abhijit Menon-Sen
At 2013-11-21 22:14:35 +0100, and...@2ndquadrant.com wrote: > > I'd certainly want a setting that errors out if it cannot get the > memory using hugetables. OK, then the current try/on/off settings are fine. I'm better today, so I'll read the patch Heikki posted and see what more needs to be done

Re: [HACKERS] Building on S390

2013-11-24 Thread Peter Eisentraut
On Sat, 2013-11-23 at 11:49 -0500, Tom Lane wrote: > > My point is, they compile the *backend* as position-independent > code. > > The backend is not a shared library. Maybe it is in Postgres-XC? > But > > at least this makes their build process significantly different, so > it's > > doubtful that

Re: [HACKERS] Traffic jams in fn_extra

2013-11-24 Thread Tom Lane
Simon Riggs writes: > On 24 November 2013 16:02, Paul Ramsey wrote: >> We do the dance because it’s how we always have and don’t know any other >> way, any better way. :) The usual explanation. Is there any place you can >> point to that demonstrates your technique? > src/backend/utils/mmgr/RE

Re: [HACKERS] Re[2]: [HACKERS] Connect from background worker thread to database

2013-11-24 Thread Michael Paquier
On Mon, Nov 25, 2013 at 2:10 AM, Alexey Vasiliev wrote: > Воскресенье, 24 ноября 2013, 14:06 +01:00 от Andres Freund > : > > Hi, > > > On 2013-11-24 16:27:06 +0400, Олексій Васильєв wrote: >> This is part where I try to connect to database: >> https://github.com/le0pard/pg_web/blob/master/src/pg_w

Re: [HACKERS] Errors on missing pg_subtrans/ files with 9.3

2013-11-24 Thread J Smith
coredumper worked like a charm. Useful tool, that is... although as a bit of advice, I'd try not to run it on Postgres if your various memory settings are tweaked towards production use -- the core dump that was captured on my server weighed in at 16 GB. Anyways, I've attached both the log entries

Re: [HACKERS] Traffic jams in fn_extra

2013-11-24 Thread Simon Riggs
On 24 November 2013 16:02, Paul Ramsey wrote: > We do the dance because it’s how we always have and don’t know any other way, > any better way. :) The usual explanation. Is there any place you can point to > that demonstrates your technique? src/backend/utils/mmgr/README You can create memory

Re: [HACKERS] review: create if not exists

2013-11-24 Thread Pavel Stehule
sorry + * all regress tests passed without error 2013/11/24 Pavel Stehule > Hello, > > this patch introduces IF NOT EXISTS clause to CREATE (AGGREGATE | CAST > |COLATION |DOMAIN |ROLE |SEQUENCE |SEARCH CONFIGURATION |SEARCH DICTIONARY > | SEARCH PARSE | SEARCH TEMPLATE | TYPE). Implemented fea

[HACKERS] review: create if not exists

2013-11-24 Thread Pavel Stehule
Hello, this patch introduces IF NOT EXISTS clause to CREATE (AGGREGATE | CAST |COLATION |DOMAIN |ROLE |SEQUENCE |SEARCH CONFIGURATION |SEARCH DICTIONARY | SEARCH PARSE | SEARCH TEMPLATE | TYPE). Implemented feature was discussed more times in spring and summer, and this patch was ready for commit

Re: [HACKERS] Traffic jams in fn_extra

2013-11-24 Thread Paul Ramsey
Hi Simon, We do the dance because it’s how we always have and don’t know any other way, any better way. :) The usual explanation. Is there any place you can point to that demonstrates your technique? Thanks! P -- Paul Ramsey http://cleverelephant.ca/ http://postgis.net/ On Sunday, Novem

Re: [HACKERS] Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

2013-11-24 Thread Pavel Stehule
2013/11/21 Peter Eisentraut > On 11/21/13, 2:35 AM, Pavel Stehule wrote: > > I am feeling, so almost all people prefer > > > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > > > Can we live with it? > > Fine with me. > > I think it helps if you consider IF EXISTS an att

[HACKERS] session_preload_libraries not in sample config?

2013-11-24 Thread Jeff Davis
session_preload_libraries is not in the sample config file. Is that just an oversight? Regards, Jeff Davis -- 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] Add CREATE support to event triggers

2013-11-24 Thread Andrew Tipton
On Thu, Nov 21, 2013 at 2:36 AM, Christopher Browne wrote: >> b) What's the best design of the SRF output? This patch proposes two >> columns, object identity and create statement. Is there use for >> anything else? Class/object OIDs perhaps, schema OIDs for objects types >> that have it? I do

Re: [HACKERS] [PATCH] SQL assertions prototype

2013-11-24 Thread Andrew Tipton
On Sun, Nov 24, 2013 at 11:03 PM, Simon Riggs wrote: > So we'd need to get access to the changed rows, rather than > re-executing a huge SQL command that re-checks every row of the table. > That last point will make it unusable for sensible amounts of data. That sounds very similar to handling in

Re: [HACKERS] PL/Python: domain over array support

2013-11-24 Thread Rodolfo Campero
Thank you very much Marko. 2013/11/24 Marko Kreen > On Sat, Nov 23, 2013 at 11:09:53AM -0200, Rodolfo Campero wrote: > > 2013/11/22 Marko Kreen > > > One more thing - please update Python 3 regtests too. > > > > > The attached patch (version 3) includes the expected results for Python 3 > > (f

Re: [HACKERS] Re: Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-24 Thread Tom Lane
I wrote: > Amit Kapila writes: >> In general it is responsibility of caller to take care of errno >> handling, but I am not sure it is taken care well at all places in >> code and the chances of such problems were less earlier because there >> was less chance that ereport would reset errno, but no

Re: [HACKERS] Sequence Access Method WIP

2013-11-24 Thread Simon Riggs
On 18 November 2013 07:06, Heikki Linnakangas wrote: > On 18.11.2013 13:48, Simon Riggs wrote: >> >> On 18 November 2013 07:50, Heikki Linnakangas >> wrote: >> >>> It doesn't go far enough, it's still too *low*-level. The sequence AM >>> implementation shouldn't need to have direct access to the

Re: [HACKERS] Sequence Access Method WIP

2013-11-24 Thread Simon Riggs
On 18 November 2013 07:36, Heikki Linnakangas wrote: > On 14.11.2013 22:10, Simon Riggs wrote: >> >> Includes test extension which allows sequences without gaps - "gapless". > > > I realize this is just for demonstration purposes, but it's worth noting > that it doesn't actually guarantee that whe

[HACKERS] Re[2]: [HACKERS] Connect from background worker thread to database

2013-11-24 Thread Alexey Vasiliev
Воскресенье, 24 ноября 2013, 14:06 +01:00 от Andres Freund : >Hi, > >On 2013-11-24 16:27:06 +0400, Олексій Васильєв wrote: >> This is part where I try to connect to database:  >> https://github.com/le0pard/pg_web/blob/master/src/pg_web.c#L92-L132 , but  >> SPI functions give error in log (it is

Re: [HACKERS] autovacuum_work_mem

2013-11-24 Thread Simon Riggs
On 19 October 2013 19:22, Peter Geoghegan wrote: > I won't repeat the rationale for the patch here. I can't see the problem that this patch is trying to solve. I'm having trouble understanding when I would use this. VACUUM uses 6 bytes per dead tuple. And autovacuum regularly removes dead tuple

Re: [HACKERS] Re: Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-24 Thread Tom Lane
Amit Kapila writes: > I think that still this kind of problems can be there at other > places in code. I checked few places and suspecting secure_read() can > also have similar problem: > case SSL_ERROR_SSL: > ereport(COMMERROR, > (errcode(ERRCODE_PROTOCOL_VIOLATION), > errmsg("SSL error: %s",

Re: [HACKERS] PL/Python: domain over array support

2013-11-24 Thread Marko Kreen
On Sat, Nov 23, 2013 at 11:09:53AM -0200, Rodolfo Campero wrote: > 2013/11/22 Marko Kreen > > One more thing - please update Python 3 regtests too. > > > The attached patch (version 3) includes the expected results for Python 3 > (file plpython_types_3.out). Thanks. Looks good now. Tagging as r

Re: [HACKERS] review - pg_stat_statements

2013-11-24 Thread Pavel Stehule
2013/11/24 Peter Geoghegan > On Sun, Nov 24, 2013 at 1:18 AM, Pavel Stehule > wrote: > > I got a compilation warning: > > I'll look into it. > > > * I tried do some basic benchmark, and I didn't see any negative on > > performance related to implemented feature > > You're never going to see any

Re: [HACKERS] Traffic jams in fn_extra

2013-11-24 Thread Simon Riggs
On 19 November 2013 23:08, Paul Ramsey wrote: > On the solution, I wasn't suggesting another void* slot, but rather a > slot that holds a hash table, so that an arbitrary number of things > can be stuffed in. Overkill, really, since in 99.9% of times only one > thing would be in there, and in the

Re: [HACKERS] Completing PL support for Event Triggers

2013-11-24 Thread Dimitri Fontaine
Peter Eisentraut writes: > I have committed the PL/Tcl part. > I'll work on the PL/Perl part next. Thanks! > I believe we're still waiting on something from you for PL/Python. Yes I still need to figure that one out. -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formati

Re: [HACKERS] preserving forensic information when we freeze

2013-11-24 Thread Simon Riggs
On 21 November 2013 16:51, Andres Freund wrote: > Definitely separate yes. And I agree, it's partially moot if Heikki's > patch gets in, but I am not sure it will make it into 9.4. There seems > to be quite some work left. I'd prefer to do all 3 patches in one release. Don't mind which one. --

Re: [HACKERS] [PATCH] SQL assertions prototype

2013-11-24 Thread Simon Riggs
On 15 November 2013 03:30, Peter Eisentraut wrote: > A constraint trigger performs the actual checking. Good, that is consistent with other constraints. > This is not a performance feature. It's for things like, this table > should have at most 10 rows, or all the values in this table must be

Re: [HACKERS] pre-commit triggers

2013-11-24 Thread Simon Riggs
On 19 November 2013 16:46, Robert Haas wrote: > On Tue, Nov 19, 2013 at 12:45 AM, Noah Misch wrote: >> On Fri, Nov 15, 2013 at 01:01:48PM -0500, Andrew Dunstan wrote: >>> The triggers don't fire if there is no real XID, so only actual data >>> changes should cause the trigger to fire. >> >> What'

[HACKERS] Re[2]: [HACKERS] Connect from background worker thread to database

2013-11-24 Thread Олексій Васильєв
If I remove comment from BackgroundWorkerInitializeConnection  https://github.com/le0pard/pg_web/blob/master/src/pg_web.c#L179  and comment  InitPostgres  https://github.com/le0pard/pg_web/blob/master/src/pg_web.c#L98 , I have the same errors in log: 2013-11-24 13:35:24 UTC ERROR:  stack depth

Re: [HACKERS] [PATCH] Report exit code from external recovery commands properly

2013-11-24 Thread Peter Eisentraut
On Wed, 2013-11-13 at 19:14 -0800, Peter Geoghegan wrote: > I think this is a very good idea, but you should go a bit further: > document the special relationship restore_command has to special > return codes. How about this? diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index

Re: [HACKERS] Connect from background worker thread to database

2013-11-24 Thread Andres Freund
Hi, On 2013-11-24 16:27:06 +0400, Олексій Васильєв wrote: > This is part where I try to connect to database:  > https://github.com/le0pard/pg_web/blob/master/src/pg_web.c#L92-L132 , but SPI > functions give error in log (it is commented): > > 2013-11-24 02:57:43 UTC ERROR:  stack depth limit ex

[HACKERS] Connect from background worker thread to database

2013-11-24 Thread Олексій Васильєв
Hello everyone. I am new to writing extensions to PostgreSQL. And I am not familiar with the C language (My professional languages: Ruby, Golang, Java). But still want to write an extension for PostgreSQL. After articles of Michael Paquier about  background workers in PostgreSQL, I realized w

Re: [HACKERS] review - pg_stat_statements

2013-11-24 Thread Peter Geoghegan
On Sun, Nov 24, 2013 at 1:18 AM, Pavel Stehule wrote: > I got a compilation warning: I'll look into it. > * I tried do some basic benchmark, and I didn't see any negative on > performance related to implemented feature You're never going to see any performance impact with something like a regul

[HACKERS] review - pg_stat_statements

2013-11-24 Thread Pavel Stehule
Hello all I did check of pg_stat_statements_ext_text.v2.2013_11_16.patch, that introduce a external storage for query text I got a compilation warning: bash-4.1$ make all gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -W

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

2013-11-24 Thread Peter Geoghegan
On Sat, Nov 23, 2013 at 11:52 PM, Peter Geoghegan wrote: > pg@hamster:~/pgbench-tools/tests$ pgbench -f upsert.sql -n -c 50 -T 20 > > I can get it to deadlock (and especially to throw unique constraint > violations) like crazy. I'm sorry, this test-case is an earlier one that is actually entirely