[GENERAL]

2007-12-20 Thread Marcin
Did anybody face the same problem during the compilation of postgresql 8.2.5 on suse 10.2? I'm using gmake 3.81 gcc -I../../include -I../../../../../src/interfaces/ecpg/include -I../../../../../src/interfaces/libpq -I../../../../../src/include -D_GNU_SOURCE -O2 -Wall -Wmissing-prototypes -Wp

Fwd: Re: [GENERAL] SuSE gcc segfault compiling pgsql

2007-12-21 Thread Marcin
> > Marcin wrote: > > > Did anybody face the same problem during the compilation of > > > postgresql 8.2.5 on suse 10.2? I'm using gmake 3.81 > > > > In the future, please include subjects in your posts. > > > > I'm very sorry

[GENERAL] [7.4.1] signal 11 while accesing DB

2005-01-24 Thread Marcin
n Woody with 2.4 kernels, and own compilation of PostgreSQL 7.4.1. The server is running for nearly two years now, with PostgreSQL for all the time, and as it's the first problem I encountered, I don't suspect it's a hardware fault. Thanks for your help, -- Marcin --

[GENERAL] Huge number of disk writes after migration to 8.1

2006-01-16 Thread Marcin
hits 160 SELECTS and about 18 modifying queries per second. The DBs are fully vacuumed every day, and vacuum analyze is performed on critical tables every 30 minutes. -- Marcin ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-17 Thread Marcin
s: writer process 30:55 postgres: stats buffer process 58:43 postgres: stats collector process (PostgreSQL was running for 12 days). It seems that some changes to stats collector introduced in 8.1 are now eating my CPU power, and probably also the (I)/O bandwidth. :( Thanks for help, -- Marcin

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-17 Thread Marcin
s = 3147.564695 (excluding connections establishing) and with stats_command_prompt enabled: tps = 2446.136610 (including connections establishing) tps = 2448.785260 (excluding connections establishing) However, I didn't notice any suspicious write activity. Thanks for suggestion, -- Marcin -

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-18 Thread Marcin
Bruce Momjian wrote: > Do you mean stats_command_string? I have seen degradation in using that Yes, I meant stats_command_string, sorry for my stupid mistake. > and am working on a patch for 8.2 to fix it. That's nice, because it's very helpful. Thanks for resp

[GENERAL] libpq heartbeat

2016-10-27 Thread Marcin Giedz
s there is such mechanism "somewhere" to avoid reimplementation ? Thx Marcin

Re: [GENERAL] libpq heartbeat

2016-10-27 Thread Marcin Giedz
r for some reasons? I'll be able to check this next morning. Regards Marcin Od: "Tom Lane" Do: "Francisco Olarte" DW: "depesz" , "Marcin Giedz" , pgsql-general@postgresql.org Wysłane: czwartek, 27 październik 2016 18:32:54 Temat: Re: [GENERAL

[GENERAL] Auotreconnect/failover libpq

2016-10-28 Thread Marcin Giedz
ething like SELECT 1 or other options available for clients to (re)establish connection to the server again after they loose it ? or I need to implement this myself ? Thx Marcin

[GENERAL] PostgreSQl HA solution

2016-11-30 Thread Marcin Giedz
'm wondering if this combines of regular stream replication + some kind of keepalive mechanism ? Regards Marcin

[GENERAL] vacuum of empty table slows down as database table count grows

2017-01-04 Thread marcin kowalski
I am experiencing an odd issue, i've noticed it on 9.3 , but i can reproduce it on 9.6. Basically, i have a database with a lot of schemas, but not that much data. Each schema is maybe 2-4 GB in size, and often much less than that. The database has ~300-500 schemas, each with ~100-300 tables. Gen

Re: [GENERAL] vacuum of empty table slows down as database table count grows

2017-01-04 Thread marcin kowalski
Thanks, i'll redo the benchmarks and report back how things look now. 2017-01-04 20:33 GMT+01:00 Pavel Stehule : > >>> > >>> > This is irrelevant of amount of data restored, i am seeing the same >>> behavior with just schema restore, as well as with schema+data restores. >>> > >>> > If anyone is

Re: [GENERAL] vacuum of empty table slows down as database table count grows

2017-01-05 Thread marcin kowalski
Well, unfortunately i am not seeing much difference. I shaved off maybe a second of worst case run. I guess i should just split the db into smaller ones, since tmpstats are now per-db. Are there any other things i could try? 2017-01-05 8:18 GMT+01:00 marcin kowalski : > Thanks, i'll

[GENERAL] full_page_writes on SSD?

2015-11-24 Thread Marcin Mańk
I saw this: http://blog.pgaddict.com/posts/postgresql-on-ssd-4kb-or-8kB-pages It made me wonder: if SSDs have 4kB/8kB sectors, and we'd make the Postgres page size equal to the SSD page size, do we still need full_page_writes? Regards Marcin Mańk

[GENERAL] Linux: PAE or x64

2010-12-15 Thread Marcin Krol
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I'll use PG on a dedicated machine with more than 4GB of memory. The problem is: what would be better to use: PAE ("bigmem" kernels) or 64-bit kernel? PAE pro: half the memory per pointer, int, etc. PAE risk: is PG able to take advantage of

[GENERAL] Recommended replication solution?

2010-12-17 Thread Marcin Krol
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello everyone, Yes I know, "size one not fits all", I specifically need: * preferably multi-master * local read, cluster-wide write * a solution that allows me to maintain consistency between masters in case of single node failure * last but not

Re: [GENERAL] database is bigger after dump/restore - why? (60 GB to 109 GB)

2011-02-24 Thread marcin mank
On Tue, Feb 22, 2011 at 9:44 PM, Aleksey Tsalolikhin wrote: > Most of our data is in a single table, which on the old server is 50 GB in > size and on the new server is 100 GB in size. > Maybe the table the on new server has fillfactor less than 100 ? Greetings Marcin -- Sent

[GENERAL] make uninstall deletes all manpages?

2013-04-23 Thread Marcin Mańk
/share/man'/man7/* /bin/sh: /bin/rm: Argument list too long So it tries to delete all my manpages. (/opt/local is a macports install). Yes, I realize installing into /opt/local was not such a hot idea to begin with. but I knew I had make uninstall, so I could easily back off, right? Regards Marcin

Re: [GENERAL] Longest Common Subsequence in Postgres - Algorithm Challenge

2013-07-08 Thread Marcin Mańk
Dnia 9 lip 2013 o godz. 00:46 Michael Paquier napisał(a): > On Tue, Jul 9, 2013 at 5:04 AM, Robert James wrote: >> On 7/8/13, hubert depesz lubaczewski wrote: >>> On Mon, Jul 08, 2013 at 09:09:26AM -0400, Robert James wrote: I have two relations, where each relation has two fields, one

Re: [GENERAL] Total ram size study

2017-04-22 Thread Marcin Giedz
Is it possible so you can share your postgresql.conf file and system settings if any for this 256G ram installation pls? Thx Marcin Sent from my BlackBerry 10 smartphone. From: Melvin Davidson Sent: Saturday, April 22, 2017 18:31 To: Vick Khera Reply To: Melvin Davidson Cc: pgsql-general

[GENERAL] Schema/table replication

2017-09-06 Thread Marcin Giedz
Hi, is there any way (3rd party software) to replicate particular schema/table not the whole database with streaming replication built-in mechanism ? Thx Marcin

Re: [GENERAL] Schema/table replication

2017-09-06 Thread Marcin Giedz
Does pglogical support views replication as I can't find it in any restrictions ? Thx Marcin Od: "Steve Atkins" Do: pgsql-general@postgresql.org Wysłane: środa, 6 wrzesień 2017 17:22:14 Temat: Re: [GENERAL] Schema/table replication > On Sep 6, 2017, at 6:00 AM, M

[GENERAL] ERROR: unexpected data beyond EOF in block of relation "RelationName"

2009-07-23 Thread Marcin Gon
86_64 GNU/Linux Postgres 8.3.7 Can anybody advise how to solve this problem? Thanks! Marcin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] ERROR: unexpected data beyond EOF in block of relation "RelationName"

2009-07-24 Thread Marcin Gon
Hi, Thanks for that. The question for me is how to find an appropriate OS patch for this? Is there a list of required patches for this Postgres release on SuSE? Regards, Marcin --- On Thu, 23/7/09, Tom Lane wrote: > From: Tom Lane > Subject: Re: [GENERAL] ERROR: unexpected data beyo

Re: [GENERAL] Partitioned tables as a poor mans columnar index?

2009-10-16 Thread marcin mank
there are some 20-ish bytes of metadata for each row? saving 4 bytes buys You nothing. Give it up. Also, these are actually pretty small tables (i.e. they fit in memory of any non-toy server). Greetings Marcin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

Re: [GENERAL] Forms generator ?

2009-10-30 Thread Marcin Stępnicki
Dnia Wed, 28 Oct 2009 12:59:22 -0400, Stuart Adams napisał(a): > Looking for a forms generator for a web based UI for > entering/modifiying/viewing a table's records. > > Any recommendations ??? http://python-rum.org/ http://www.djangobook.com/en/beta/chapter06/ -- Sent via pgsql-general

Re: [GENERAL] help getting a backtrace from 9.2 on Ubuntu 13.04?

2013-09-09 Thread Marcin Mańk
x27;m having some trouble > getting this done. > Is it crashing on a specific database object? pg_restore -v will tell you how far it went. Then try to restore only that object. Is it perhaps crashing on a specific row? Try producing a self contained test case (like only the culprit table, anonymized). Regards Marcin Mańk

Re: [GENERAL] pg_xlog size growing untill it fills the partition

2013-10-07 Thread Marcin Mańk
On Thu, Oct 3, 2013 at 11:56 PM, Michal TOMA wrote: > > Now I have: > checkpoint_completion_target = 0.9 > wal_buffers = 8MB > checkpoint_segments = 16 > checkpoint_timeout = 20min > shared_buffers = 2GB > log_checkpoints = on > > This is what I can

Re: [GENERAL] Unique - first

2013-10-27 Thread Marcin Mańk
ension to the SQL standard): select distinct on(x) x, y, z from the_table order by x, z ​ Regards Marcin Mańk

Re: [GENERAL] [SQL] [ADMIN] Scheduled Events

2013-12-17 Thread Marcin Krawczyk
I'm using pgAgent you mentioned before. You can easily schedule recurring tasks from within pgAdmin. regards mk 2013/12/11 Dev Kumkar > Resending... > > On Wed, Dec 11, 2013 at 8:29 PM, Dev Kumkar wrote: > >> Yes actually that's one alternate solution to use cron or windows >> scheduled tasks.

Re: [GENERAL] access to lexems or access to parsed elements

2011-08-26 Thread Marcin Mańk
select (ts_parse('default','the quick brown fox jumped over the lazy fox')).token Greetings Marcin Mańk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Transaction question

2012-07-11 Thread Marcin Mańk
5:38:16.724393 > > The timestamps don't match - something updated the record after 15:37:36 . Also, are the fields like srv_answers_srv_id character fields? The inserts are quoting them like varchars, which seems odd. Greetings Marcin

Re: [GENERAL] Odd corruption issue reported on dba.stackexchange.com, need advice

2012-07-24 Thread Marcin Mańk
id = get_running_pid $info{'pgdata'}.'/postmaster.pid'; kill (9, $pid) if $pid; unlink $info{'pgdata'}.'/postmaster.pid'; $result = 0; } Could the "big hammer mode" be what's killed the database? Greetings Marcin

Re: [GENERAL] Odd corruption issue reported on dba.stackexchange.com, need advice

2012-07-25 Thread Marcin Mańk
I privately pointed Martin Pitt (Debian maintainer) to this discussion, his response below. Martin, I believe what happened is: the original complainer did /etc/init.d/postgresql restart this called pg_ctlcluster --force restart this effectively did: pg_ctlcluster --force stop (which removed the p

Re: [GENERAL] Odd corruption issue reported on dba.stackexchange.com, need advice

2012-07-25 Thread Marcin Mańk
inking there. Is this actually needed / not dangerous? Greetings Marcin Mańk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] query takes a long time

2008-08-23 Thread marcin mank
> > select count(distinct attendance.studentid) > > from attendance > > where attendance.studentid not in (select studentid from attendance where > auth not in('C','E','F','G','H','I','M','N','O','R','S','T','U')) > > I am tired a lot now, but isn`t it the same as: select count(distinct attendanc

Re: [GENERAL] join question

2008-10-22 Thread marcin mank
>Sort Method: external sort Disk: 1320kB One simple speedup could be upping Your work_mem to 2M for this query, so the sorts are in memory. btw: Last time I used Postgres, it did not show the sort method. Cool. Greetings Marcin Mank -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] Using Postgres to store high volume streams of sensor readings

2008-11-23 Thread marcin mank
seconds per day = 280GB / day , not counting indices. What is the time span You want to have the data from? Greetings Marcin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
> I think the Oracle guy's version could easily be adapted to PG 8.4 --- > those little rownum subqueries seem to be just a substitute for not > having generate_series(1,9), and everything else is just string-pushing. indeed. marcin=# with recursive x( s, ind ) as ( select sud, po

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
On Thu, Nov 5, 2009 at 12:31 AM, Richard Broersma wrote: > I don't get the same results: This is due to my email client breaking the lines. Try this: http://pastebin.com/f2a0884a1 Greetings Marcin Mańk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
On Thu, Nov 5, 2009 at 12:39 AM, marcin mank wrote: > On Thu, Nov 5, 2009 at 12:31 AM, Richard Broersma > wrote: >> I don't get the same results: > > This is due to my email client breaking the lines. > Try this: http://pastebin.com/f2a0884a1 doh. http://www.pastie.or

[GENERAL] db size and VACUUM ANALYZE

2010-02-12 Thread Marcin Krol
Hello, The db in the application I maintain but didn't write (it obviously makes use of PG, v 8.3), has been systematically growing in size from about 600M to 1.6G. At the same time, the performance of the app has degraded significantly (several times). So I've done VACUUM ANALYZE on entire db.

Re: [GENERAL] db size and VACUUM ANALYZE

2010-02-12 Thread Marcin Krol
Amitabh Kant wrote: You need to do VACUUM FULL ANALYZE to claim the disk space, but this creates a exclusive lock on the tables. See http://www.postgresql.org/docs/8.3/static/sql-vacuum.html Aha! OK but why did the performance degrade so much? The same reason -- lack of autovacuuming/vacuum

Re: [GENERAL] db size and VACUUM ANALYZE

2010-02-12 Thread Marcin Krol
Bill Moran wrote: Note that the "correct" disk size for your database is probably closer to the 1.6G you were seeing before. This might be the case, but how do I find out what are the "correct" sizes? I have a script that does following queries: SELECT relpages * 8192 AS size_in_bytes, reln

[GENERAL] vacuum analyze GROWS db ?!

2010-02-15 Thread Marcin Krol
Hello everyone, The app that created this db is written by me for a change. But I've done simple VACUUM ANALYZE on the biggest table in db and got this: before VACUUM ANALYZE: hrs=# SELECT relpages * 8192 AS size_in_bytes, relname FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_names

[GENERAL] CLUSTER cannot complete

2010-02-15 Thread Marcin Krol
Hello everyone, I got this, first CLUSTER was hanging forever, I cancelled after half an hour: hrs=# CLUSTER hosts; Cancel request sent ERROR: canceling statement due to user request Then I restarted postgres and get this now: hrs=# CLUSTER hosts; ERROR: there is no previously clustered

[GENERAL] CLUSTER cannot complete

2010-02-15 Thread Marcin Krol
Hello everyone, Resolved, I've done: hrs=# CLUSTER hosts_ip_idx ON hosts; CLUSTER hrs=# hrs=# hrs=# SELECT relpages * 8192 AS size_in_bytes, relname FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'public') ORDER BY size_in_bytes DESC LIMIT 10; size_in_bytes

[GENERAL] Selection of index for CLUSTER

2010-02-15 Thread Marcin Krol
Hello everyone, Is there some guideline for selection of index to use for CLUSTER? This is rather important as physical table is reorganized according to that index I gather? The docs are mute on this. The docs recommend running ANALYZE on the table. hrs=# ANALYZE VERBOSE hosts; INFO: analy

Re: [GENERAL] vacuum analyze GROWS db ?!

2010-02-15 Thread Marcin Krol
Tom Lane wrote: Do you *know* that relpages was up to date before that? If your system only does manual vacuums then those numbers probably reflected reality as of your last vacuum. There are functions that will give you true file sizes but relpages ain't it. Oh great. Another catch. What are

[GENERAL] The REAL cost of joins

2010-03-03 Thread Marcin Krol
Hello everyone, I have inadvertently set off a furball on an unrelated ng on what is the actual cost of SQL joins. But there's no reliable conclusion. I would like to actually know that, that is, are JOINs truly expensive? As they say, one measurement is worth a thousand opinions, so I've don

[GENERAL] [general] rsync'd database requires reindex - why ?

2011-11-21 Thread marcin kowalski
Hi list. I'm migrating a bunch of old suse 9.3 systems with postgresql 8.2 databases to opensuse 11.4 systems with 8.2 databases (the exact same version - 8.2.14). From there, the databases will be migrated to postgresql 9.x with custom process. Let's assume that 9.3 machine is machine A, and new

Re: [GENERAL] Query Optimizer makes a poor choice

2011-12-01 Thread Marcin Mańk
pects to quickly hit a matching record while scanning the primary key, an there is a nasty surprise. It seems there is no perfect solution, things You might want to try: -fooling with random_page_cost/seq_tuple_cost/work_mem -"order by card_id-1" -an index on (card_set_id, card_id) Gre

Re: [GENERAL] View vs Constantly Updated Table

2008-12-16 Thread marcin mank
An account should have a balance. Every operation should have balance before operation, value, balance after operation. You should never update an operation. This way when business rules change all previous documents are stored in consistent state. Greetings Marcin Mańk -- Sent via pgsql-gener

Re: [GENERAL] Query sometimes takes down server

2009-01-15 Thread marcin mank
fiddle with some geqo parameters (raising geqo_effort is the first choice). Greetings Marcin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] What is the best plan to upgrade PostgreSQL from an ancient version?

2009-01-26 Thread marcin mank
r apps don`t depend on this behaviour. good luck Marcin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [SQL] Oracle to PostgreSQL

2009-03-16 Thread Marcin Stępnicki
On Mon, Mar 16, 2009 at 12:35 AM, Greenhorn wrote: > Hi, > > I have almost 1300 files from Oracle (no access to oracle server).  I > have to create the tables and data as follows. (...) snip (...) > Any recommendation is greatly appreciated :) Try here: http://wiki.postgresql.org/wiki/Converting

Re: [GENERAL] intermittant performance problem

2009-03-29 Thread marcin mank
sql. Greetings Marcin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] intermittant performance problem

2009-03-29 Thread marcin mank
On Sun, Mar 29, 2009 at 10:24 AM, marcin mank wrote: > I think (a part of) Your problem is that order by random() is O(N > logN) complexity, while You are after O(N) . > > The solution (in pseudocode) > [snip] OK, I may be guiding You the wrong way select g,g,g,g from

[GENERAL] weird problem with PG 8.1

2009-03-31 Thread Marcin Krol
Hello everyone, I'm having this completely weird problem that ORDER BY doesn't seem to work correctly in PG 8.1 as bundled in RedHat 5. When I issue: SELECT * FROM virtualization; I get all the fields: reservations=# SELECT * FROM virtualization; id | Virtualization | color +

[GENERAL] complicated query (newbie..)

2009-04-09 Thread Marcin Krol
Hello everyone, I've got 3 tables: hosts (with host.id column) and reservation (with reservation.id column) in many-to-many relation, and reservation_hosts which is an association table (with reservation_id and host_id columns). So I've got this query which selects hosts and reservations unde

Re: [GENERAL] complicated query (newbie..)

2009-04-09 Thread Marcin Krol
Hello Aurimas, Thanks for answer! Do you need a MIN(start_date) for each host you get from the query before last join? Yes, I really do - the idea is that from several reservations fulfilling the dates condition the earliest reservation has to be selected (i.e. the one with minimum start da

Re: [GENERAL] complicated query (newbie..)

2009-04-09 Thread Marcin Krol
Sam Mason wrote: On Thu, Apr 09, 2009 at 04:47:32PM +0200, Marcin Krol wrote: I've got 3 tables: hosts (with host.id column) and reservation (with reservation.id column) in many-to-many relation, and reservation_hosts which is an association table (with reservation_id and host_id co

[GENERAL] ON condition in LEFT OUTER JOIN doesn't work?!

2009-04-09 Thread Marcin Krol
Hello everyone, I've got this query: SELECT hosts.id, MIN(reservation.start_date) FROM hosts LEFT OUTER JOIN reservation_hosts ON reservation_hosts.host_id = hosts.id LEFT OUTER JOIN reservation ON (reservation_hosts.reservation_id = reservation.id AND reservation.start_date > 2009-04-09) GROU

Re: [GENERAL] complicated query (newbie..)

2009-04-09 Thread Marcin Krol
Hello Sam, Thanks a million for reply! I'm so frustrated with this.. Sam Mason wrote: On Thu, Apr 09, 2009 at 06:08:04PM +0200, Marcin Krol wrote: What I'm trying to accomplish is producing list of hosts available within a specified timeframe. What I have is a table of hosts

Re: [GENERAL] complicated query (newbie..)

2009-04-09 Thread Marcin Krol
Sam Mason wrote: This is a big hint that things are going wrong. You need those quotes in there, an "integer" is a plain number and not a date. This one does work in the sense of selecting out the wrong host but it still produces nothing but NULLs! SELECT h.id, r.id, r.start_date, r.end_da

Re: [GENERAL] complicated query (newbie..)

2009-04-09 Thread Marcin Krol
e responsabilité pour le contenu fourni. > Date: Thu, 9 Apr 2009 18:08:04 +0200 > From: mrk...@gmail.com > To: s...@samason.me.uk > CC: pgsql-general@postgresql.org > Subject: Re: [GENERAL] complicated query (newbie..) > > Sam Mason wrote: > > On Thu, Apr 09, 2009 a

Re: [GENERAL] complicated query (newbie..)

2009-04-09 Thread Marcin Krol
Sam Mason wrote: On Thu, Apr 09, 2009 at 07:25:42PM +0200, Marcin Krol wrote: Sam Mason wrote: This is a big hint that things are going wrong. You need those quotes in there, an "integer" is a plain number and not a date. This one does work in the sense of selecting out the wrong h

Re: [GENERAL] complicated query (newbie..)

2009-04-10 Thread Marcin Krol
Thanks a lot, Sam (and others), thanks to your help I managed to finally produce the query I wanted. Regards, mk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PostgreSQL Object-Oriented Database?

2009-04-27 Thread marcin mank
Is there any sane reason to use an array column, besides performance (the values can be read in less disk seeks than in a table-with-a-foreign-key scenario)? Greetings marcin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] retrieving primary key for row with MIN function

2009-04-30 Thread Marcin Krol
Hello everyone, I need to retrieve PK (r.id in the query) for row with MIN(r.start_date), but with a twist: I need to select only one record, the one with minimum date. Doing it like this does not solve the problem: SELECT h.id AS host_id, MIN(r.start_date) AS reservation_start_date, r.id A

Re: [GENERAL] execute/perform and FOUND

2006-09-21 Thread Marcin Mank
a bug. What is it that I > am missing out on here ? > With: perform cmd; raise notice ''found (perform): %'', found; You effectively do: select 'select 1 from test where fk_item=1324314' ; Try: perform 1 from test where fk_item=1324314 Greetings M

Re: [GENERAL] Recovering deleted or updated rows

2006-11-15 Thread Marcin Mank
red less than what You get. -start postmaster, and You should see the old data. -pg_dump the table . There may be some strange things in the dump - review it manually. -stop postmaster -restore datafiles from backup (pg_resetxlog may have messed up your data) Greetings Marcin -

[GENERAL] statement_timeout

2006-11-16 Thread Marcin Mańk
issue. and vacuumdb. This is all on 8.1.4 . Yeah, system-wide statement_timeout is not much of a brilliant idea :( Pozdrawiam Marcin Mańk ---(end of broadcast)--- TIP 4: Have you searched our list archives? http

Re: [GENERAL] statement_timeout

2006-11-17 Thread Marcin Mańk
o.) > "alter role set statement_timeout" solves my immediate problem (I did not know about it, thanks guys). Maybe a comment in postgresql.conf, or docs: # note: statement_timeout applies to autovacuum, pg_dump, vacuumdb etc. # If you set it globally, consider "alter role postgres set stat

Re: [GENERAL] Finding uniques across a big join

2005-12-01 Thread Marcin Inkielman
query? I guess I should take consirerably less time than the first one. Usualy I do "these things" like this... This is the only possibility for the planner to use indexes. The query plan you send us shows that are mostly seq scans are used. Regards, Marcin Inkielman ---

[GENERAL] alter table schema in 8.0

2005-12-10 Thread Marcin Inkielman
the oid of the public namespace. I didn't found any other reference to pg_catalog.pg_namespace.oid. Did anybody try something like this? I examined the sources of AlterTableNamespace() defined in tablecmds.c but it wasn't realy helpful. I will appreciate any help. Best regards,

Re: [GENERAL] I need help creating a query

2006-07-14 Thread Marcin Mank
| 99 > worker2 | 2006-04-01 | programmer | 2 > This should work: select distinct on(W.worker_id) W.name,P.position,P.salary from worker W,position P where P.worker_id=W.worker_id and 'SOME DATE' >= P.startdate order by W.worker_id,P.startdate Cheers Marcin

Re: [GENERAL] references/tutorial/tricks on dynamic generation of sql (& plpgsql functions) editing/coding

2006-09-11 Thread Marcin Mank
e blah blah :para1 blah blah blah blah :para2 ''; v_query=replace(v_query,'':para1'',quote_literal(value_1)); v_query=replace(v_query,'':para2'',quote_ident(value_2)); execute v_query; end; ' language plpgsql;

[GENERAL] index problem

2000-06-01 Thread Marcin Inkielman
tent my question is: ~~~~~~~ how may i delete this index in my original database??? thanks for any help.. marcin inkielman

[GENERAL] vacuumdb problem

2000-07-02 Thread Marcin Inkielman
Hi! I have a problem with vacuumdb on one of my tables. (spiral:3)-[~]$vacuumdb -t osoby -v dziekanat NOTICE: --Relation osoby-- NOTICE: Pages 229: Changed 0, reaped 16, Empty 0, New 0; Tup 4427: Vac 5, Keep/VTL 0/0, Crash 0, UnUsed 70, MinLen 64, MaxLen 616; Re-using: Free/Avail. Space 18176/

Re: [GENERAL] table count limitation

2000-08-27 Thread Marcin Inkielman
cts is characterised by other number of features) and I dont have to compare (select) products having other types (i.e. cars and computers in 1 querry). If i could have 1 tables - one table for each type of products this queries would be a lot simplier - don't you think? PS. sorry for my English - I hope I was understood -- Marcin Inkielman

Re: [GENERAL] table count limitation

2000-08-27 Thread Marcin Inkielman
wife's grandparents emigrated from around > Lodz in 1904~06 and settled in Winnipeg, Manitoba in Western Canada. /mt I live near Warsaw. LÓdź (Lodz - if your e-mail reader do not support iso-8859-2 ;) ) is ~100km from here. You must be a very happy man if your wife is partially from Poland. Polish women are really beautifull! ;)) regards, Marcin Inkielman

[GENERAL] pg_dump on view

2000-10-03 Thread Marcin Mazurek
up of attribute 0 in relation 54498 failed '. what does it mean? How to get rid of it, any hints? maz Marcin Mazurek -- Kierownik Działu Systemowego MULTINET SA o/Poznan http://www.multinet.pl/

Re: [GENERAL] pg_dump on view

2000-10-03 Thread Marcin Mazurek
of it, any hints? > I'd guess this means that the underlying table has been deleted... it's a view and working one but what i noticed: mtldb=# \d zadania_wykonane ERROR: cache lookup of attribute 0 in relation 59299 failed mtldb=# Marcin Mazurek -- Kierownik Działu Systemowego MULTINET SA o/Poznan http://www.multinet.pl/

[GENERAL] plpgsql, insert with wariables in function triggered

2000-10-16 Thread Marcin Mazurek
AME; tabb :=tab || ''_do_zablokowania''; ... if (NEW.stan=ids1) then INSERT INTO tabb (zlecenie) VALUES ( OLD.id); --line that casues the trouble end if; ... tia Marcin Mazurek -- Kierownik Działu Systemowego MULTINET SA o/Poznan http://www.multinet.pl/

[GENERAL] finding dependencies with altered table

2000-10-28 Thread Marcin Mazurek
Hi, lets say I'm changing a table with alter. Of course related views etc are broken, how can I find all tables etc. depended on that table ? tia mazek Marcin Mazurek -- Kierownik Działu Systemowego MULTINET SA o/Poznan http://www.multinet.pl/

[GENERAL] order of trigger sequence

2000-11-06 Thread Marcin Mazurek
Hi, is there a way to set up an order in which triggers are fired up on same table? tia mazek Marcin Mazurek -- Kierownik Działu Systemowego MULTINET SA o/Poznan http://www.multinet.pl/

[GENERAL] explain results in pg logs

2001-01-07 Thread Marcin Mazurek
HI, I couldn't find an answer in doc, so here's the question. Is it possible to to have result similar to explain command in postgres log. I've turned on plan in pg_options but results are not to readable for me (anyone has a doc about it?). I need it to find queries which I can optimize by using

[GENERAL] Startup script

2001-04-07 Thread Marcin Wasilewski
hello everybody, Maybe someone could help me with ODBC setup with POSTGRESQL thanks, Marcin . ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere"

[GENERAL] Postgresql - multibyte

2001-05-22 Thread Marcin Wasilewski
postgresql-7.1/src' gmake: *** [all] Error 2 Can anyone help me. Best regards Marcin ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

[GENERAL] rules - optimizing

1998-12-16 Thread Marcin Grondecki
gives seq scan as result. Relation word_list has about 300 000 tuples, so it's rather boring to w8 1 or 2 s to insert ONE word. Could i do smth to enforce index scan when using above rule? BTW. sorry for my english :( Marcin Grondecki [EMAIL PROTECTED] * I'm not a complete idiot, some parts are missing...

Re: [GENERAL] Re: [INTERFACES] the last row in a table

1999-03-09 Thread Marcin Grondecki
> There is better answer, i think. Simply read smth about cursors - declaring, using, droping. I think this is what u need. In case of troubles with understanding, i'd serve with some examples in Perl. Marcin Grondecki [EMAIL PROTECTED] +48(604)468725 * I'm not a complete idiot, some parts are missing...

Re: [GENERAL] Calcuate percentage.

1999-03-09 Thread Marcin Grondecki
age > >1 |50% >2 |33% >3 |17% > >=== > >Any clue? > >Please help. > >Sze Wong > > > > > > >_ >DO YOU YAHOO!? >Get your free

Re: [GENERAL] trouble with sum

1999-03-19 Thread Marcin Grondecki
;ve used similar commands like this one with other engines with no >trouble > >what do i need to do to get it to work with postgre > Marcin Grondecki [EMAIL PROTECTED] +48(604)468725 * I'm not a complete idiot, some parts are missing...

Re: [GENERAL] database-level locking

1999-03-19 Thread Marcin Grondecki
. > >Of course the better solution would be if postgres was always able to >identify and clear out its excesses, but we have found that is not the >case. > >Karl > > Marcin Grondecki [EMAIL PROTECTED] +48(604)468725 * I'm not a complete idiot, some parts are missing...

Re: [GENERAL] trouble with sum

1999-03-19 Thread Marcin Grondecki
let me combine sum(P.price) with the other selects > >this should work right? > Marcin Grondecki [EMAIL PROTECTED] +48(604)468725 * I'm not a complete idiot, some parts are missing...

Re: [GENERAL] ERROR: nodeRead: Bad type 0

1999-09-27 Thread Marcin Inkielman
atabase: pr pr=> create table "Jêzyk_obcy"(a text); CREATE pr=> select * from "Jêzyk_obcy"; a - (0 rows) pr=> create view "Jêzyk_obcy1" as select * from "Jêzyk_obcy"; CREATE pr=> select * from "Jêzyk_obcy1"; a - (0 rows) just a killing space?? -- Marcin Inkielman sibi omino similis?

Re: [GENERAL] Postgres concurrency : urgent

1999-11-11 Thread Marcin Inkielman
> Thanks and regards, > > Kimi I 'm using : LOCK <> IN ACCESS EXCLUSIVE MODE; to control concurrent transactions - it works for me (postgres 6.5.2) Marcin Inkielman .~.

[GENERAL] a problem with single char recoding

1999-12-17 Thread Marcin Inkielman
ost iso -- i think files iso-win.tab/win-iso.tab are ok. thanks for any hint... Marcin Inkielman

  1   2   >