Re: [GENERAL] How to erase transaction logs on PostgreSQL

2012-03-08 Thread Guillaume Lelarge
On Fri, 2012-03-09 at 00:09 +, Frank Church wrote: > > > On 8 March 2012 16:23, Guillaume Lelarge > wrote: > On Thu, 2012-03-08 at 10:18 +, Frank Church wrote: > > How do you purge the postgresql transaction log? > > > > > You don't. Post

Re: [GENERAL] how to return the last inserted identity column value

2012-03-08 Thread Ondrej Ivanič
Hi, On 9 March 2012 05:20, Scott Marlowe wrote: > On Thu, Mar 8, 2012 at 11:16 AM,   wrote: >> In some languges you can use set l_localid = @@identity which returns >> the value of the identity column defined in the table.  How can I do >> this in Postgres 9.1 > > Assuming you created a table lik

Re: [GENERAL] Synchronous replication + Fusion-io = waste of money OR significant performance boost? (compared to normal SATA-based SSD-disks)?

2012-03-08 Thread Ondrej Ivanič
Hi, On 9 March 2012 02:23, dennis jenkins wrote: > I've also looked at the Fusion-IO products.  They are not standard > flash drives.  They don't appear as SATA devices.  They contains an > FPGA that maps the flash directly to the PCI bus.  The kernel-mode > drivers blits data to/from them via DM

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-08 Thread Simon Riggs
On Thu, Mar 8, 2012 at 8:01 PM, Andy Colson wrote: > On 03/08/2012 01:40 PM, Stefan Keller wrote: >> >> Hi >> >> I do have a student who is interested in participating at the Google >> Summer of Code (GSoC) 2012 >> Now I have the "burden" to look for a cool project... Any ideas? >> >> -Stefan >> >

Re: [GENERAL] A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?

2012-03-08 Thread Scott Marlowe
On Thu, Mar 8, 2012 at 1:10 PM, Aleksey Tsalolikhin wrote: >> On Thu, Mar 8, 2012 at 12:10 PM, Aleksey Tsalolikhin >> wrote: >>> On Wed, Mar 7, 2012 at 10:05 AM, Aleksey Tsalolikhin >>> wrote:  We're replicating a PostgreSQL 8.4.x database using Slony1-1.2.x  My biggest table

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-08 Thread dennis jenkins
>> Now I have the "burden" to look for a cool project... Any ideas? >> >> -Stefan >> > > How about one of: > > 1) on disk page level compression (maybe with LZF or snappy) (maybe not page > level, any level really) > > I know toast compresses, but I believe its only one row.  page level would > com

Re: [GENERAL] A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?

2012-03-08 Thread Aleksey Tsalolikhin
> On Thu, Mar 8, 2012 at 12:10 PM, Aleksey Tsalolikhin > wrote: >> On Wed, Mar 7, 2012 at 10:05 AM, Aleksey Tsalolikhin >> wrote: >>>  We're replicating a PostgreSQL 8.4.x database using Slony1-1.2.x >>> >>> >>>  My biggest table measures 154 GB on the origin, and 533 GB on >>>  the slave. >>> >>

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-08 Thread Andy Colson
On 03/08/2012 01:40 PM, Stefan Keller wrote: Hi I do have a student who is interested in participating at the Google Summer of Code (GSoC) 2012 Now I have the "burden" to look for a cool project... Any ideas? -Stefan How about one of: 1) on disk page level compression (maybe with LZF or sna

Re: [GENERAL] A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?

2012-03-08 Thread Scott Marlowe
On Thu, Mar 8, 2012 at 12:10 PM, Aleksey Tsalolikhin wrote: > On Wed, Mar 7, 2012 at 10:05 AM, Aleksey Tsalolikhin > wrote: >>  We're replicating a PostgreSQL 8.4.x database using Slony1-1.2.x >> >> >>  My biggest table measures 154 GB on the origin, and 533 GB on >>  the slave. >> >>  Why is my

[GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-08 Thread Stefan Keller
Hi I do have a student who is interested in participating at the Google Summer of Code (GSoC) 2012 Now I have the "burden" to look for a cool project... Any ideas? -Stefan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.post

Re: [GENERAL] A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?

2012-03-08 Thread Aleksey Tsalolikhin
On Wed, Mar 7, 2012 at 10:05 AM, Aleksey Tsalolikhin wrote: >  We're replicating a PostgreSQL 8.4.x database using Slony1-1.2.x > > >  My biggest table measures 154 GB on the origin, and 533 GB on >  the slave. > >  Why is my slave bigger than my master?  How can I compact it, please? On Wed, Ma

Re: [BUGS] [GENERAL] Altering a table with a rowtype column

2012-03-08 Thread Mike Blackwell
Not a bad idea. I'd need to convert existing data, but it'd be an excuse to try out hstore. ^_^ Mike * * On Thu, Mar 8, 2012 at 11:08, Merlin Moncure wrote: > On Wed, Mar 7, 2012 at 2:49 PM, Merlin Moncure wrote: > > On a practical level, the error blocks nothing -- you can bypass it > > tri

Re: [GENERAL] How to erase transaction logs on PostgreSQL

2012-03-08 Thread Achilleas Mantzios
one ultra dummy way would be to dump, back up, destroy the data dirs, and any human /var/log files and then re-initdb and restore. On Πεμ 08 Μαρ 2012 12:18:17 Frank Church wrote: > How do you purge the postgresql transaction log? > > I am creating a virtual machine image and I want to erase any t

Re: [GENERAL] how to return the last inserted identity column value

2012-03-08 Thread Scott Marlowe
On Thu, Mar 8, 2012 at 11:16 AM, wrote: > In some languges you can use set l_localid = @@identity which returns > the value of the identity column defined in the table.  How can I do > this in Postgres 9.1 Assuming you created a table like so: smarlowe=# create table test (id serial,info text);

[GENERAL] how to return the last inserted identity column value

2012-03-08 Thread mgould
In some languges you can use set l_localid = @@identity which returns the value of the identity column defined in the table. How can I do this in Postgres 9.1 Michael Gould Intermodal Software Solutions, LLC 904-226-0978 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) T

[GENERAL] why no create variable

2012-03-08 Thread mgould
There seems to be CREATE everything in Postgres but it would be really nice to have a CREATE VARIABLE which would allow us to create global variables. I know there are other techniques but this would be the easiest when doing a init routine when a user logs in to the application. Best Regards M

Re: [BUGS] [GENERAL] Altering a table with a rowtype column

2012-03-08 Thread Merlin Moncure
On Wed, Mar 7, 2012 at 2:49 PM, Merlin Moncure wrote: > On a practical level, the error blocks nothing -- you can bypass it > trivially.   It's just an annoyance that prevents things that users > would like to be able to do with table row types.  So I'd argue to > remove the check, although I can

Re: [GENERAL] How to erase transaction logs on PostgreSQL

2012-03-08 Thread Guillaume Lelarge
On Thu, 2012-03-08 at 10:18 +, Frank Church wrote: > How do you purge the postgresql transaction log? > You don't. PostgreSQL does it for you. > I am creating a virtual machine image and I want to erase any transaction > logs that got built up during development. What is the way to do that?

Re: [GENERAL] FDWs, foreign servers and user mappings

2012-03-08 Thread Guillaume Lelarge
On Thu, 2012-03-08 at 10:04 -0500, Joe Abbate wrote: > On 03/08/2012 12:06 AM, Shigeru Hanada wrote: > > I think that makes, and will make sense. Because SQL/MED standard > > mentions about schema for only foreign table in "4.12 SQL-schemas" section. > > > > FYI, pgAdmin III shows them as a tree

[GENERAL] How to erase transaction logs on PostgreSQL

2012-03-08 Thread Frank Church
How do you purge the postgresql transaction log? I am creating a virtual machine image and I want to erase any transaction logs that got built up during development. What is the way to do that? I am currently using 8.3 and 8.4. Is there the possibility that the logs saved in /var/log also contai

Re: [GENERAL] Synchronous replication + Fusion-io = waste of money OR significant performance boost? (compared to normal SATA-based SSD-disks)?

2012-03-08 Thread dennis jenkins
I've also looked at the Fusion-IO products. They are not standard flash drives. They don't appear as SATA devices. They contains an FPGA that maps the flash directly to the PCI bus. The kernel-mode drivers blits data to/from them via DMA, not a SATA or SAS drive (that would limit transfer rates

Re: [GENERAL] FDWs, foreign servers and user mappings

2012-03-08 Thread Joe Abbate
On 03/08/2012 12:06 AM, Shigeru Hanada wrote: > I think that makes, and will make sense. Because SQL/MED standard > mentions about schema for only foreign table in "4.12 SQL-schemas" section. > > FYI, pgAdmin III shows them as a tree like: > > Database > FDW > Server > User Mapping >

Re: [GENERAL] Synchronous replication + Fusion-io = waste of money OR significant performance boost? (compared to normal SATA-based SSD-disks)?

2012-03-08 Thread Merlin Moncure
On Wed, Mar 7, 2012 at 2:54 AM, Joel Jacobson wrote: > My company is in the process of migrating to a new pair of servers, running > 9.1. > > The database performance monetary transactions, we require > synchronous_commit on for all transactions. > > Fusion-io is being considered, but will it giv

Re: [GENERAL] Advisory transaction lock for 128-bit space

2012-03-08 Thread Merlin Moncure
On Thu, Mar 8, 2012 at 2:05 AM, Kiriakos Georgiou wrote: > Indeed, if there is not some sort of implementation limitation, it would be > cool to be able to lock two big integers like so: > >     pg_try_advisory_xact_lock(key1 bigint, key2 bigint) Well, this would require expanding the structure t

Re: [GENERAL] rounding a timestamp to nearest x seconds

2012-03-08 Thread Andy Colson
On 03/07/2012 08:11 PM, Daniele Varrazzo wrote: On Wed, Mar 7, 2012 at 3:09 PM, Andy Colson wrote: Took me a while to figure this out, thought I'd paste it here for others to use: create or replace function round_timestamp(timestamp, integer) returns timestamp as $$ select date_trunc('

Re: [GENERAL] autovacuum and transaction id wraparound

2012-03-08 Thread Jens Wilke
On Wednesday 07 March 2012 21:13:26 pawel_kukawski wrote: Hi, > Do you know any real reason why the autovacuum may fail to clear old XIDs? If it's unable to keep up. Or may be, if there're very long running idle in transactions. > Is this highly probable ? postmaster will shutdown to prevent w

[GENERAL] Automatic shadow-table management script

2012-03-08 Thread Anssi Kääriäinen
I have released an experimental shadow table management script at: https://github.com/akaariai/pgsql_shadow_tables The idea is simple: there are some plpgsql functions which create shadow tables and insert/update/delete triggers by introspecting pg_catalog and information_schema. There is very

Re: [GENERAL] Advisory transaction lock for 128-bit space

2012-03-08 Thread Kiriakos Georgiou
Indeed, if there is not some sort of implementation limitation, it would be cool to be able to lock two big integers like so: pg_try_advisory_xact_lock(key1 bigint, key2 bigint) That would solve your problem with locking UUIDs (although you still couldn't lock UUIDs simultaneously across di