Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Activity (RSS)

Saturday, August 18 2012
117 Memory leak with named cursors was updated
  • flox
    flox commented at 8:48 AM

    I am running this on Debian Squeeze.
    It's possibly related to the way the memory is allocated then released.

    I don't have other test case than the "testmem.py" ...

Friday, August 17 2012
119 psycopg2-2.4.5 - and PostgreSQL 9.1.4, cannot get libpq.so.5 linked in was updated
  • Federico Di Gregorio
    Federico Di Gregorio commented at 1:10 PM

    You're getting it wrong. Let me try to explain. Under Linux (and Solaris I guess) you can do dynamic or static linking. Static linking means including a version...

  • Lou Picciano
    Lou Picciano commented at 12:25 PM

    Thanks for your help here.
    I've tried with static_libpq=1 in setup.cfg; after a successful build, output of ldd is:

    $ ldd build/lib.solaris-2.11-i86pc-2.6/psyc...
  • Federico Di Gregorio
    Federico Di Gregorio commented at 11:50 AM

    setup.py is linking in libpq. What you want is to embed a statically linked version of libpq into the _psycopg.so module. You can try to pass the --static-libpq...

  • Lou Picciano
    Lou Picciano commented at 11:37 AM

    Federico, Tks for that response. As I mentioned, I am able to direct psycopg2 to libpq at runtime with the LD_LIBRARY_PATH (meant to be only a 'technology demon...

  • Federico Di Gregorio
    • State changed from new to invalid
    by Federico Di Gregorio at 7:28 AM

    Build-time linking and run-time linking are different things. This is how run-time (dynamic) linking works: you need to put the libpq library into one of the de...

1 earlier change…
  • Lou Picciano
    Lou Picciano created the ticket at 3:12 AM

    Ciao, Daniele!

    Trying to make wider use of psycopg now, with builds of latest version. With psycopg2-2.4.5 - and PostgreSQL 9.1.4, cannot get libpq.so.5 linked ...

120 typecast_array.c tests size_t against <0 was updated
  • Federico Di Gregorio
    • State changed from open to resolved
    • Assigned user set to Federico Di Gregorio
    by Federico Di Gregorio at 12:55 PM

    This is better:

    if (stack_index == 0)
        return -1;
    array = stack[--stack_index];
    

    and should fix the warning.

  • Federico Di Gregorio
    • State changed from new to open
    by Federico Di Gregorio at 11:58 AM

    The warning is correct but using <= instead of < would break array parsing. That test is a guard to avoid the (impossible?) case of receiving more ASCAN_END tha...

  • Psycopg website
    Psycopg website created the ticket at 11:47 AM

    Submitted by: mjl@laubach.at

    The clang compiler complains that:

    In file included from psycopg/typecast.c:179:
        ./psycopg/typecast_array.c:227:31: warning: c...
Wednesday, August 15 2012
108 enable SCROLL / NO SCROLL for named cursors was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 10:33 AM

    Got no reply back. However I've merged the patch and added test and docs myself.

    I've made scrollable three-states: None (default) specifies no scroll option. T...

Tuesday, August 14 2012
114 hstore adapter was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 10:30 PM

    Fixed in my devel. Thank you for the report.

116 Hangs on insert when using RealDictCursor was updated
  • Daniele Varrazzo
    • State changed from new to hold
    by Daniele Varrazzo at 9:21 PM

    I'm putting this bug on hold: I haven't got enough info to fix it. Please provide a test case if you care.

117 Memory leak with named cursors was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 9:18 PM

    So it's no link in psycopg, just the way the python gc works, right?

118 Error in register_composite python 3 was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 8:59 PM

    Hello Joshua,

    register_composite works for me.

    In psql:

    psql (9.0.3, server 9.0.5)
    Type "help" for help.
    
    piro=> create type foo as  (a integer, b integer);
    CR...
  • Joshua Boshi
    Joshua Boshi created the ticket at 11:33 AM

    I am running psycopg2 2.4.5 on python 3.2.2.

    I found error in psycopg2.extras.register_composite which is probably caused because of usage of old formatting of ...

Friday, August 10 2012
117 Memory leak with named cursors was updated
  • flox
    flox commented at 11:57 PM

    I changed the test_fetch() function to release the memory.
    For some reason, "del big_var" is not enough. A "gc.collect()" call is required.

    def test_fetch(curs...
  • flox
    • Assigned user cleared.
    by flox at 11:26 PM
  • flox
    flox commented at 11:25 PM
  • flox
    • Assigned user set to Daniele Varrazzo
    by flox at 11:24 PM

    This is the test file attached.

    And the output:

    $ python testmem.py psycopg2 version 2.4.5 (dt dec pq3 ext)
    Record size: 1024 B; Memory used: 8.8 MB
    Record size...

  • Psycopg website
    Psycopg website created the ticket at 11:18 PM

    Submitted by: flox

    When fetching a named cursor with large records > 16340 bytes, the memory is not released.

Friday, July 20 2012
116 Hangs on insert when using RealDictCursor was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 10:29 PM

    Does it hang forever or just takes longer to complete?

    Can you provide a self-contained test case for the problem?

    Thank you.

  • Psycopg website
    Psycopg website created the ticket at 9:04 PM

    Submitted by: Jeff Shanab

    Traceback (most recent call last):
      File "C:\Program Files (x86)\MVSArchiveServerD_x86-1.2.15\scripts\InstallDb.py", line 504, in <m...
Sunday, July 08 2012
115 documentation typo was updated
  • Daniele Varrazzo
    • State changed from new to resolved
    by Daniele Varrazzo at 9:53 PM

    Fixed, thank you.

Friday, July 06 2012
115 documentation typo was created
Thursday, June 28 2012
112 Psycopg2 hung queries was updated
  • Josh Berkus
    Josh Berkus commented at 10:21 PM

    Daniele,

    The original bug isn't mine, I'm just adding to it because it seems to be the exact same symptoms. It's Anoop's bug originally.

    I am using 2.4.5.

    We'll...

  • Daniele Varrazzo
    Daniele Varrazzo commented at 10:07 PM

    Josh, another possible source of help: try compiling and running psycopg with debug info (setting PSYCOPG_DEBUG in setup.cfg and running the program with the PS...

  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 9:51 PM

    Josh, are you using the latest, 2.4.5? There have been a few multithread bug fixed in that version.

    Anoop, from your tag I see you are using 2.4.1: can you try ...

  • Josh Berkus
    Josh Berkus commented at 9:19 PM

    I'm seeing the exact same problem in a multithreaded Python application. It makes and drops connections rapidfire for a few minutes, then hangs. GDB indicates t...

113 Psycopg2 - Eventlet connection hang was updated
  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 10:03 PM

    The problem is in psyco_clear_result_blocking: it is called because the network problem has been detected. That function was supposed to be called upon an error...

Wednesday, June 27 2012
114 hstore adapter was updated
  • Adrian Klaver
    Adrian Klaver commented at 8:09 PM

    In the meantime would it be possible to change the documentation to make this plain.

  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 5:35 PM

    Yes, several psycopg parts don't work correctly with RealDict cursors, because they are not dbapi-compatible. Supplying the OID is the designed workaround.

    OTOH...

  • Psycopg website
    Psycopg website created the ticket at 4:42 PM

    Submitted by: Adrian Klaver

    Seems the register_hstore only works with connections that use cursors that return an indexed tuple. When using the RealDictConnecti...

Saturday, June 23 2012
113 Psycopg2 - Eventlet connection hang was created
  • Psycopg website
    Psycopg website created the ticket at 2:47 PM

    Submitted by: anoop

    I have a program which keeps a persistent connection to a postgresql server. Suppose the connection is blocked due to network issues(can be ...

112 Psycopg2 hung queries was created
  • Psycopg website
    Psycopg website created the ticket at 2:44 PM

    Submitted by: anoop

    We have a python program which uses psycopg2 to make a connection every 2 seconds to postgresql-9.0 and batch insert/update records. The con...

Sunday, June 03 2012
111 Library not loaded: libssl.1.0.0.dylib was updated
  • Dan Koch
    Dan Koch commented at 11:57 PM

    Adding the following symlinks to /usr/lib fixed this problem for me on Mac OS X 10.6.8 with PostgreSQL 9.0.7 (EnterpriseDB installer) and psycopg2 2.4.5:

    libssl...

Tuesday, May 29 2012
111 Library not loaded: libssl.1.0.0.dylib was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:22 AM

    Hello Chad,

    this is a problem with your build chain. None of us uses OSX for development so we are not able to debug it.

    If you cannot debug it yourself, please...

  • Psycopg website
    Psycopg website created the ticket at 2:02 AM

    Submitted by: chad@zetaweb.com

    I can build psycopg2 but when I import it I get:

    Traceback (most recent call last):
    File "", line 1, in File "/Users/whit537/pers...

Wednesday, May 23 2012
110 Possible multithreading problem in psycopg2. was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 10:18 AM

    This bug was terrible, I just wonder why it hasn't bit us before. So I'm for releasing soon, even if its longevity tells it's not hot urgent.

    I try and run the ...

  • Manu Cupcic
    Manu Cupcic commented at 7:29 AM

    Thanks,

    I would just like to know if this is going to mean a new release soon, or if I should build the module from a patched fork for the time being.

    Manu

109 Cannot build without pg_config was updated
  • Steven Winfield
    Steven Winfield commented at 10:12 AM

    No problem :-)
    Thanks for fixing setup.cfg

  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 10:10 AM

    Committed in my devel.

    Thank you Steven, sorry for asking you a patch that we ended up not merging.

  • Federico Di Gregorio
    Federico Di Gregorio commented at 7:43 AM

    That's fine with me.

Tuesday, May 22 2012
109 Cannot build without pg_config was updated
  • Daniele Varrazzo
    • State changed from hold to open
    by Daniele Varrazzo at 4:32 PM

    Ok with something like that?

    diff --git a/setup.cfg b/setup.cfg
    index db4e771..ce17624 100644
    --- a/setup.cfg
    +++ b/setup.cfg
    @@ -22,26 +22,11 @@ have_ssl=0
     #...
  • Federico Di Gregorio
    Federico Di Gregorio commented at 3:58 PM

    Yes, we should remove it before next release and replace it with an explanation text.

  • Daniele Varrazzo
    Daniele Varrazzo commented at 2:55 PM

    Definitely we should sort out the inconsistency. Fog, shall we remove the *_dirs from setup.cfg?

110 Possible multithreading problem in psycopg2. was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 4:26 PM

    Fixed in my devel. Thank you again, Manu.

  • Federico Di Gregorio
    Federico Di Gregorio commented at 3:56 PM

    I'd avoid switching to malloc() because, at least in theory, PyMem_Malloc tells the interpreter how much memory pressure we're putting on it and that's a Good T...

  • Manu Cupcic
    Manu Cupcic commented at 3:40 PM

    At a first glance that seems the only place where we call psycopg_escape_string without GIL, but couldn't tell for other PyMem_Malloc.

    I came to the same conc...

  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 3:15 PM

    I think you are right, thank you for the report.

    At a first glance that seems the only place where we call psycopg_escape_string without GIL, but couldn't tell ...