![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I ran the following query on my database: --------------- update bv_descriptions set description = REPLACE(description, '\\n', '\n'); commit; --------------- It finished fine but to my surprise when I ran "df" on the server the drive usage jumped from 44% to 60% which is additional 650MB. I tried to restart the server but it didn't do any good, eventually I tried to do a FULL VACUUM on that table and it did the trick and cleaned the lost space. I am still confused about what happened... What took these additional 650MB? I could understand this phenomenon if it happened before I did COMMIT... But why did it stay after COMMIT too? |
#2
| |||
| |||
|
#3
| |||
| |||
|
#4
| |||
| |||
|
|
This is expected. It has to do with MVCC, not commit. PostgreSQL creates a duplicate record for each record that was updated. This is how MVCC hangs on to "old" records that may still be in use by other transactions. SNIP Cheers, Steve |
#5
| |||
| |||
|
|
I'm sending this parse command after which the backend completely stops responding (just the session, not the whole server): Byte1('P'): "P" Int32: 41 String: "mystatement" + null byte String: "select * from mytable;" + null byte Int16: 0 |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Is there a query on some system table that will list all names of prepared statements? |
#8
| |||
| |||
|
|
"M. Bastin" <marcbastin (AT) mindspring (DOT) com> writes: Is there a query on some system table that will list all names of prepared statements? No, since they are never stored on disk. Same comments apply to Portals I suppose. If you'd like to lobby to get this changed |
#9
| |||
| |||
|
|
[...] The fact that you can work with parameters opens up a whole new dimension as well, e.g.: SELECT * FROM population WHERE age > $1 AND age < $2; I only wish there were more documentation about the extended query language. All I've found on the whole internet would hold on 2 to 3 printed pages. Did I miss something?) |
|
Can the denizens of this group enlighten me about what the advantages of Python are, versus Perl ? "python" is more likely to pass unharmed through your spelling |
#10
| |||
| |||
|
|
I only wish there were more documentation about the extended query language. All I've found on the whole internet would hold on 2 to 3 printed pages. Did I miss something?) I'm not sure what exactly you are missing, but the page documenting the PREPARE statement (in the official Postgres docs) pretty much says it all. Also, it's easy to find (Docs -> Reference -> SQL Commands -> PREPARE). http://www.postgresql.org/docs/7.4/s...l-prepare.html However, maybe we're actually talking about completely different things |
![]() |
| Thread Tools | |
| Display Modes | |
| |