Re: [GENERAL] Foreign data wrappers and indexes on remote side

2015-06-26 Thread Filip Rembiałkowski
Is WHERE clause push-down implemented in any known fdw? Thank you. On Fri, Jun 26, 2015 at 6:19 PM, Tom Lane wrote: > =?UTF-8?Q?Filip_Rembia=C5=82kowski?= writes: >> Is there any way to take use of indexes on foreign tables? > >> Currently (at least with tds_fdw, that I was testing) the plann

[GENERAL] Foreign data wrappers and indexes on remote side

2015-06-26 Thread Filip Rembiałkowski
Hi. Is there any way to take use of indexes on foreign tables? Currently (at least with tds_fdw, that I was testing) the planner just does a dumb full sequential scan in all cases. That is SELECT drink FROM foreignbar; -- takes as much time as SELECT drink FROM foreignbar where drink_key = 32

Re: [GENERAL] SQL Server access from PostgreSQL

2015-05-18 Thread Filip Rembiałkowski
ilip On Mon, May 18, 2015 at 6:23 PM, Geoff Montee wrote: > Hi Filip, > > On Mon, May 18, 2015 at 7:52 AM, Filip Rembiałkowski > wrote: >> Hi. >> >> I will be happy to hear your opinion which one is better - odbc_fdw or >> tds_fdw? >> >> In terms o

[GENERAL] SQL Server access from PostgreSQL

2015-05-18 Thread Filip Rembiałkowski
Hi. I will be happy to hear your opinion which one is better - odbc_fdw or tds_fdw? In terms of performance / stability / convenience. (Pg on OpenSuse, MS SQL on Win2008 ) Thanks! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] 9.0 hot standby, consistent recovery state question

2013-08-28 Thread Filip Rembiałkowski
Hi. I have Pg 9.0 wal shipping hot standby secondary server. The primary is under constant stream of updates (avg 20 TXID/s). There are many lengthy COPY FROM operations in the primary. After every restart of secondary postgres I observe that it takes a fair amount of time (sometimes few minute

Re: [GENERAL] Why does slony use a cursor? Anyone know?

2013-03-07 Thread Filip Rembiałkowski
On Tue, Mar 5, 2013 at 3:51 PM, Shaun Thomas wrote: > Hey everyone, > > Frankly, I'm shocked at what I just found. > > We did a delete last night of a few million rows, and come back this > morning to find that slony is 9-hours behind. After some investigation, it > became apparent that slony open

Re: [GENERAL] update performance of degenerate index

2013-01-28 Thread Filip Rembiałkowski
Just some questions, which might be helpful. What size is this index? What is underlying table size? Is ANALYZE running regularly (autovacuum or manual)? What are stats for exported_when column (pg_stats)? Did you look at pg_locks during this lengthy update? Do you have many concurrent statements

[GENERAL] nonexistent user in pg_class.relacl messing pg_dump output

2013-01-15 Thread Filip Rembiałkowski
Hi all, I observed this strange data error: In pg_dump output, I found such line, which is causing error upon restore: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE addresshistory TO "158755274"; It appears that pg_class.relacl column has this literally typed in: dev=# select count(*) from pg_class

[GENERAL] question on foreign key lock

2012-11-01 Thread Filip Rembiałkowski
Hello. Why adding FK creates AccessExclusiveLock on referenced tabble? {{{ CREATE TABLE A ( id integer, idb integer ); INSERT INTO A (id,idb) SELECT x, x%4 FROM generate_series(1,100) x; CREATE TABLE B ( id int primary key ); INSERT INTO B VALUES (0),(1),(2),(3); BEGIN; ALTER TABLE A ADD CONST

Re: [GENERAL] Improve MMO Game Performance

2012-10-13 Thread Filip Rembiałkowski
On Sat, Oct 13, 2012 at 1:52 PM, Arvind Singh wrote: > > To understand my query, please consider the following scenario > we store game progress in a postgres table. > A tournament starts with four players and following activity > > Each player starts with 100hitpoints > player 1 makes a strike (

Re: [GENERAL] avoiding CONTEXT messages

2012-05-11 Thread Filip Rembiałkowski
On Fri, May 11, 2012 at 9:41 AM, hubert depesz lubaczewski < dep...@depesz.com> wrote: > On Fri, May 11, 2012 at 09:09:46AM -0500, Filip Rembiałkowski wrote: > > I am using PostgreSQL 9.0 and I want to suppress CONTEXT part of error > > message for selected user defined Pl/Pg

[GENERAL] avoiding CONTEXT messages

2012-05-11 Thread Filip Rembiałkowski
Hi, I am using PostgreSQL 9.0 and I want to suppress CONTEXT part of error message for selected user defined Pl/PgSQL functions. Is this possible? http://www.postgresql.org/docs/9.0/static/runtime-config-logging.html#GUC-LOG-ERROR-VERBOSITYsuggests it is... My function is running on superuser acc

Re: [GENERAL] empty role names in pg_dumpall output

2012-04-27 Thread Filip Rembiałkowski
On Fri, Apr 27, 2012 at 10:23 AM, Tom Lane wrote: > Ah-ha.  How about the member and grantor OIDs in those rows --- do > they correspond to still-existing roles?  (I believe "10" would be > the bootstrap superuser, so that should certainly still exist, but > those other numbers are for user-made

Re: [GENERAL] empty role names in pg_dumpall output

2012-04-27 Thread Filip Rembiałkowski
On Wed, Apr 25, 2012 at 8:56 PM, Tom Lane wrote: > =?UTF-8?Q?Filip_Rembia=C5=82kowski?= writes: >> PostgreSQL 9.0.4 > >> I have this in pg_dumpall -g output (non-empty role names changed): > >> GRANT "" TO a  GRANTED BY postgres; >> GRANT "" TO b GRANTED BY c; >> GRANT "" TO b GRANTED BY c; >> GR

[GENERAL] empty role names in pg_dumpall output

2012-04-25 Thread Filip Rembiałkowski
Hi, PostgreSQL 9.0.4 I have this in pg_dumpall -g output (non-empty role names changed): GRANT "" TO a GRANTED BY postgres; GRANT "" TO b GRANTED BY c; GRANT "" TO b GRANTED BY c; GRANT "" TO b GRANTED BY c; GRANT "" TO b GRANTED BY c; GRANT "" TO "" GRANTED BY c; GRANT "" TO "" GRANTED BY post

[GENERAL] DROP and re-CREATE a table, and ERROR: could not open relation with OID xyz

2012-04-19 Thread Filip Rembiałkowski
Hi all, I have a program which replaces (DROP + CREATE) some frequently-used table. Sometimes, just after the table is replaced, I get "ERROR: could not open relation with OID xyz" from concurrent clients accessing the table. One could say this behaviour breaks transaction isolation... Does it?

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

2012-03-15 Thread Filip Rembiałkowski
On Thu, Mar 15, 2012 at 6:43 AM, Aleksey Tsalolikhin < atsaloli.t...@gmail.com> wrote: > > Is there any way to consolidate the pages on the slave without taking > replication offline? > maybe CLUSTER? filip@dev=> create table foobar (id serial primary key, load text); CREATE TABLE filip@dev=> in

Re: [GENERAL] Correct way for locking a row for long time without blocking another transactions (=nowait)?

2012-02-29 Thread Filip Rembiałkowski
On Wed, Feb 29, 2012 at 8:18 AM, Durumdara wrote: > 2012/2/28 Filip Rembiałkowski : >> A way to force error when any statement takes more than 200 msec: >> SET statement_timeout TO '200ms'; > > As I see that is not needed here. > Only for normal

Re: [GENERAL] Correct way for locking a row for long time without blocking another transactions (=nowait)?

2012-02-28 Thread Filip Rembiałkowski
On Tue, Feb 28, 2012 at 10:26 AM, Durumdara wrote: > Hi! > > In FireBird I can set the transaction to "nowait". > When I want to protect a row for long time (showing a dialog, and on > closing I release the row), I need to do this: > > trans.StartTransaction(); > sql.execute('update thetable set a

Re: [GENERAL] Let-bindings in SQL statements

2012-01-26 Thread Filip Rembiałkowski
On Thu, Jan 26, 2012 at 3:37 PM, Jon Smark wrote: > Hi, > > Is it possible to do the equivalent of let-bindings in a pure SQL function? > I have a SELECT that invokes "now" multiple times. It would be nicer > to do it only once and reuse the value. Something like this: > > LET right_now = SELEC

Re: [GENERAL] ESET NOD32 Antivirus interference with PostgreSQL

2012-01-20 Thread Filip Rembiałkowski
On Sat, Jan 21, 2012 at 1:45 AM, Bruce Duncan wrote: > Just wanted to give a heads up to anyone who might be having a similar > problem. We had an installation on a customer machine that had the AV > product "ESET NOD32" installed. We quickly started having problems when > there were two or more

Re: [GENERAL] string = any()

2012-01-11 Thread Filip Rembiałkowski
W dniu 10 stycznia 2012 22:52 użytkownik David Johnston napisał: > If you are going to supply one parameter per "possible value" anyway skip the > whole "ANY" and "ARRAY" and just say " 'bob' IN ($1, $2 [,...]) "; true :-) prepare($sql); $stmt->execute($names); ?> PHP from several years cries

Re: [GENERAL] string = any()

2012-01-10 Thread Filip Rembiałkowski
gt;>> $args = "{1,2,3}"; >>> >>> And run it: >>> >>> $q = pg_query_params($db, $sql, $args); > On 1/10/2012 9:11 AM, Filip Rembiałkowski wrote: >> maybe try to use ARRAY constructor instead? >> >> http://www.postgresql.org/docs/9.

Re: [GENERAL] string = any()

2012-01-10 Thread Filip Rembiałkowski
maybe try to use ARRAY constructor instead? http://www.postgresql.org/docs/9.0/static/sql-expressions.html#SQL-SYNTAX-ARRAY-CONSTRUCTORS 2012/1/10 Andy Colson : > Hi all. > > I am writing PHP where it prepares a statement like: > $sql = 'select * from aTable where id = any($1)'; > > then in php

Re: [GENERAL] please help understand freeing shared buffers

2012-01-06 Thread Filip Rembiałkowski
2012/1/6 Tom Lane : > =?UTF-8?Q?Filip_Rembia=C5=82kowski?= writes: >> Among following queries, only THREE runs fast enough for me. >> I can't understand the logic behind this. > > I'm not sure why you'd expect real answers when you haven't shown us > what the query is doing, it is an UDF, encapsu

[GENERAL] please help understand freeing shared buffers

2012-01-06 Thread Filip Rembiałkowski
Among following queries, only THREE runs fast enough for me. I can't understand the logic behind this. I once thought that shared buffers replacement is independent from whether the backend which used it is still alive. But is it true? Seems like shared buffers are "returned to the pool" or "fr

Re: [GENERAL] Show in psql does any calculations?

2011-12-27 Thread Filip Rembiałkowski
so as long as actual logic is buried in the guts of psql, best you can do in SQL to get human-readable value is SELECT name, setting, unit, case when unit='kB' then pg_size_pretty(setting::int*1024) when unit='8kB' then pg_size_pretty(setting::int*1024*8) else coalesce(setting||' '||unit,setting)

Re: [GENERAL] segfault with plproxy

2011-12-20 Thread Filip Rembiałkowski
W dniu 20 grudnia 2011 15:36 użytkownik Marko Kreen napisał: >> Is schema a part of function signature? > > Yes. Thanks again, that explains everything. In the meantime, depesz has a solution basing on application_name, not on username+schema as I tried. http://www.depesz.com/index.php/2011/1

Re: [GENERAL] segfault with plproxy

2011-12-19 Thread Filip Rembiałkowski
W dniu 19 grudnia 2011 10:39 użytkownik Marko Kreen napisał: > It seems you are making plproxy call public.list_users() recursively. > Postgres probably OOM-s somewhere then. I have log_statement='all' and the function is called only once: 2011-12-19 13:15:11 CET 20416 [local] testdb filip LOG:

Re: [GENERAL] segfault with plproxy

2011-12-19 Thread Filip Rembiałkowski
W dniu 19 grudnia 2011 10:39 użytkownik Marko Kreen napisał: > On Sat, Dec 17, 2011 at 10:25:40PM +0100, Filip Rembiałkowski wrote: >> Following scrip causes segmentation fault. Any ideas why / how to diagnose? > >> create table part0.users( check(id%2=0) ) inherits (public

[GENERAL] segfault with plproxy

2011-12-17 Thread Filip Rembiałkowski
Hello, I have a problem with PL/Proxy (sorry for not posting to plproxy-users, but I have some problem subscribing there). I try to use it to achieve "single node paralellism" - as MattK nicely put it on http://dba.stackexchange.com/questions/9097/single-node-parallelism-with-pl-proxy My setup

Re: [GENERAL] What's the best way in Postgres9 to store a bunch of arbitrary boolean values for a row?

2011-12-05 Thread Filip Rembiałkowski
Do not fall too easilly into hstore :-) while it sometimes good and extremely easy to setup, it has some drawbacks - querying and searching has some limitations (keys/values not easily indexable, horrible syntax) - storage not optimised (one hstore field = several dozens of boolean columns) - only

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-30 Thread Filip Rembiałkowski
no easy, "standard" way of doing this in postgres. before we go into workarounds - what's the underlying OS? 2011/11/29 Heiko Wundram : > Hello! > > Sorry for that subscribe post I've just sent, that was bad reading on my > part (for the subscribe info on the homepage). > > Anyway, the title say

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-29 Thread Filip Rembiałkowski
W dniu 29 listopada 2011 23:18 użytkownik Heiko Wundram napisał: > Okay, that's too bad that there's no standard way for this. The underlying > OS is Linux (Gentoo, to be exact), and I'd already thought about setting up > some form of iptables firewalling, but there's no real framework for this >

Re: [GENERAL] Query Optimizer makes a poor choice

2011-11-29 Thread Filip Rembiałkowski
2011/11/29 Tyler Hains : > I haven't had a chance to experiment with the SET STATISTICS, but that > got me going on something interesting... > > Do these statistics look right? > > # SELECT attname, n_distinct, most_common_vals, histogram_bounds FROM > pg_stats WHERE tablename = 'cards'; > ... >

Re: [GENERAL] Extending the volume size of the data directory volume

2011-11-29 Thread Filip Rembiałkowski
here's what I would do to analyze this first: - vmstat 1 - iostat -k -x 3 - look into system logs, maybe something actually happened there... - look at the process list. find if some of Pg processes are in D state - strace -f -v 2011/11/29 panam : > Hi, > > as I am importing gigabytes of d

Re: [GENERAL] initdb failure on Windows 2003

2011-11-29 Thread Filip Rembiałkowski
what is the output when you run this in command line: ...\path\to\initdb.exe c:\testpgdata ? 2011/11/29 Mike Wylde : > I’m trying to install Postgres 8.4.9.1 on a Windows 2003 SP2 64bit operating > system. The download has installed previously (to a windows 7 box) so I know > it should be OK b

Re: [GENERAL] Query Optimizer makes a poor choice

2011-11-29 Thread Filip Rembiałkowski
2011/11/29 Tyler Hains : > # explain analyze select * from cards where card_set_id=2850 order by > card_id limit 1; >    QUERY PLAN > -

Re: [GENERAL] 9.1 got really fast ;)

2011-10-16 Thread Filip Rembiałkowski
2011/10/15 Chris Travers > > > On Sat, Oct 15, 2011 at 1:33 PM, Grzegorz Jaskiewicz wrote: > >> >> On 15 Oct 2011, at 21:20, Thomas Kellerer wrote: >> > >> > Total runtime: -2.368 ms << this is amazing ;) >> > >> > This is with 9.1.1 on a Windows XP machine >> >> Are you saying that Windows

Re: [GENERAL] Drill-downs and OLAP type data

2011-10-11 Thread Filip Rembiałkowski
Mondrian (which is a part of Pentaho BI stack) is an open source OLAP engine with MDX. See http://community.pentaho.com/projects/bi_platform/ 2011/10/12 Anthony Presley > Hi there! > > We have a typical data-warehouse type application, and we'd like to set up > a star-schema type data analysis

Re: [GENERAL] could not create file "base/16384/11500": File exists

2011-10-10 Thread Filip Rembiałkowski
is 9.0.4 on the Linux platform. >> The vaccum - related settings have default values. >> >> If it is OID wrap around, how to resolve it? >> >> Regards, >> Harshitha >> >> >> >> 2011/10/10 Filip Rembiałkowski >> >>> Hello, >&g

Re: [GENERAL] could not create file "base/16384/11500": File exists

2011-10-10 Thread Filip Rembiałkowski
Hello, You gave much too little information. Please see http://wiki.postgresql.org/wiki/Guide_to_reporting_problems Especially: - server version, platform - vacuum-related settings It *might* be OID wraparaound. 2011/10/10 Harshitha S > Hi, > > We are the following msg in the postgres logs.

Re: [GENERAL] Best PostGIS function for finding the nearest line segment to a given point

2011-10-09 Thread Filip Rembiałkowski
2011/10/8 René Fournier > > Thanks. Based on some further reading, this is what I came up with, in > order to hopefully use the GiST index to greatest benefit: > > gc3=# SELECT datasetnam, r_hnumf, r_hnuml, r_stname_c, r_placenam, > ST_Distance(ST_GeomFromText('POINT(-114.053205 51.069644)',4269)

Re: [GENERAL] Best PostGIS function for finding the nearest line segment to a given point

2011-10-08 Thread Filip Rembiałkowski
2011/10/8 René Fournier > Wow, have to say, I love Postgresql and PostGIS. Just awesome. > > So I have a table with ~400,000 rows, each representing a road or street > (multi line segment). I want to select the row whose line segment is closest > the a given point. The following query... > > gc3=

Re: [GENERAL] Restoring 2 Tables From All Databases Backup

2011-10-06 Thread Filip Rembiałkowski
tgresql-8.4 and Ubuntu 10.04 > > What to do know? > > Thanks > > > Raymond O'Donnell wrote: > > On 06/10/2011 11:34, Filip Rembiałkowski wrote: > > > > To use existing data directory in new installation, you can just stop > the server, replace data_director

Re: [GENERAL] Strange primary key error on insertion

2011-10-06 Thread Filip Rembiałkowski
2011/10/6 Rory Campbell-Lange > I have a strange issue (postgres 8.4) trying to insert old rows back > into the s_tbls table. A check on the primary key (n_id) between > s_tbl_import and s_tbls yields no matches, yet the index on s_tbls.n_id > yields an error when attempting to insert: > > => sel

Re: [GENERAL] Restoring 2 Tables From All Databases Backup

2011-10-06 Thread Filip Rembiałkowski
2011/10/6 Adarsh Sharma > ** > Thanks to all, the problem is solved now. > > But Still I donot know how to use existing data directory (near about > 110GB) in a new Postgres Installation. > I ask this in the list yesterday but still no clue on this. > Please guide if it is possible. > > You need

Re: [GENERAL] How to create database link and synonym in postgresql 9.0

2011-10-05 Thread Filip Rembiałkowski
There is no CREATE SYNONYM in PostgreSQL and it's not planned for implementation. There is also no direct support for foreign data wrapper. But it's planned for 9.2. Nearest that you can get with PostgreSQL 9.0 is cautious use of dblink and views and rules. here's a sample script to show what I

Re: [GENERAL] Restoring 2 Tables From All Databases Backup

2011-10-05 Thread Filip Rembiałkowski
2011/10/5 Adarsh Sharma > Dear all, > > About 1 month ago, I take a complete databases backup of my Database server > through pg_dumpall command. > Today I need to extract or restore only 2 tables in a database. > > Is it possible or I have to restore complete Databases again. Size of > backup is

Re: [GENERAL] gaps/overlaps in a time table : current and previous row question

2011-10-05 Thread Filip Rembiałkowski
2011/10/5 thomas veymont > hello, > > let's say that each rows in a table contains a start time and a end > time ("timeinterval" type), > there is no such type ( no result for select * from pg_type where typname ~ 'timeinterval' ). can you show exact table structure (output of psql "\d" or bette

Re: [GENERAL] Help needed in Search

2011-09-29 Thread Filip Rembiałkowski
Siva, in addition to what others said, please note that underscore matches any character. to change it use escape char. http://www.postgresql.org/docs/9.1/static/functions-matching.html#FUNCTIONS-LIKE 2011/9/28 Siva Palanisamy > Hi All, > > ** ** > > I am trying to retrieve the contact

Re: [GENERAL] Quick-and-Dirty Data Entry with LibreOffice3?

2011-09-26 Thread Filip Rembiałkowski
2011/9/26 Rich Shepard > Rather than writing an application right now to enter data into a table I > thought of trying LibreOffice as a front end. But, it doesn't seem to work > as OO.o did. It does, albeit you will need libreoffice-base which is not always installed by default (not in my Ubun

Re: [GENERAL] [Solved] Generic logging system for pre-hstore using plperl triggers

2011-09-26 Thread Filip Rembiałkowski
2011/9/27 Diego Augusto Molina > Hi, I had to implement a logging system for some DBs in work. It's > generic and implemented using plperl. I've seen tons of mails on the > list from newbies asking for something like this using plpgsql, but no > specific solution is pointed for them. I think this

Re: [GENERAL] Does postgresql 9.0.4 use index on PREFIX%SUFFIX queries?

2011-09-26 Thread Filip Rembiałkowski
Edson, 1. PostgreSQL IS able to use btree index to execute this query. More generally, it is able to use btree index for all PREFIX search. 2. You will need a special (NOT spatial) index for it CREATE INDEX notafiscal_numeroctc_tpo_idx ON notafiscal (numeroctc text_pattern_ops); ( see http://www.

Re: [GENERAL] pg_dump compress

2011-09-23 Thread Filip Rembiałkowski
2011/9/23 Gregg Jaskiewicz > can you pipe things on windows ? > Yes you can. It surprised me positively several years ago. http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true > It's a desktop system after all, :-) what a nice dose of condesc

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Filip Rembiałkowski
Phoenix, how large (in total) is this database)? can you copy (cp -a) the data directory somewhere? I would do this just in case :-) regarding the manual recovery process: 1. you'll have to isolate corrupted table. you can do this by dumping all tables one-by-one (pg_dump -t TABLE) until you g

Re: [GENERAL] How can I get the list of index(or other objects) which depends on a function

2011-01-05 Thread Filip Rembiałkowski
2011/1/5 flying eagle > I want to get all the dependencies of a table, I know how to get the index > list using sql, but I don't know how to get the list of objects who using a > function, for example: > > CREATE OR REPLACE FUNCTION reverse_last_64(TEXT) RETURNS TEXT AS $$ > SELECT > array_to_st

Re: [GENERAL] WAL Archiving Stopped

2011-01-04 Thread Filip Rembiałkowski
W dniu 4 stycznia 2011 14:55 użytkownik Norberto Delle napisał: > Em 3/1/2011 18:39, Filip Rembiałkowski escreveu: > > archiver process will retry later; it never stops trying, sleep time >> is just longer. >> >> 2011/1/3, Norberto Delle: >> >>> Hi all

Re: [GENERAL] WAL Archiving Stopped

2011-01-03 Thread Filip Rembiałkowski
archiver process will retry later; it never stops trying, sleep time is just longer. 2011/1/3, Norberto Delle : > Hi all > > I have a PostgreSQL 9.0.1 instance, with WAL Archiving. > Today, after some failed tries to archive a WAL file, it stopped trying > to archive the files, > but the number of

Re: [GENERAL] Constraining overlapping date ranges

2010-12-25 Thread Filip Rembiałkowski
; > Thanks, Robert > > PS. I don't think the f_point function is necessary. Something like: > ... EXCLUDE USING gist (id WITH =, f_period(start_date, end_date) WITH &&) > seems equivalent to your suggestion: > ... EXCLUDE USING gist (f_point(id) WITH ~=, f_period(s

Re: [GENERAL] Constraining overlapping date ranges

2010-12-22 Thread Filip Rembiałkowski
2010/12/22 Thomas Kellerer : > I'm curious why you use this syntax as you have fixed values and could use > the "standard" VALUES construct without problems: > > INSERT INTO tbl VALUES (1, '2010-01-01', '2010-12-31'); no particular reason; just two keystrokes less :-) The SQL code is postgres-sp

Re: [GENERAL] Constraining overlapping date ranges

2010-12-22 Thread Filip Rembiałkowski
2010/12/21 McGehee, Robert : > PostgreSQLers, > I'm hoping for some help creating a constraint/key on a table such that there > are no overlapping ranges of dates for any id. > > Specifically: Using PostgreSQL 9.0.1, I'm creating a name-value pair table as > such this: > > CREATE TABLE tbl (id IN

Re: [GENERAL] How to use pgbouncer

2010-12-21 Thread Filip Rembiałkowski
2010/12/21 Andreas Kretschmer : > > I'm looking for a solution to split read and write access to different > servers (streaming replication, you know ...). Can i do that with > pgpool? (setting backend_weightX=0 or 1)? I have read the doc, but i'm > not sure if pgpool the right solution, maybe you

Re: [GENERAL] How to use pgbouncer

2010-12-21 Thread Filip Rembiałkowski
2010/12/21 Adarsh Sharma : > Dear all, > > I am not able to find any useful document regarding Configuration and > Running Pgbouncer with Postgres-8.4.2. that's strange, there are several good pages on the web; there is also my mini-howto: http://filip.rembialkowski.net/pgbouncer-mini-howto-benchm

Re: [GENERAL] Maximum size for char or varchar with limit

2010-12-20 Thread Filip Rembiałkowski
2010/12/19 Jasen Betts > I have some values of perhaps 20Mb that I might want to store samples > of in a partitioned table. (so I can delete them easily) what's the right > way? > > 20 Mbits or 20 MBytes? how big samples? answer to your question depends on what you want to do with these samples

Re: [GENERAL] Postgres Installation

2010-12-16 Thread Filip Rembiałkowski
2010/12/16 Adarsh Sharma > Dear all, > > Is there are any useful links for Installing Postgres_9.1 (recent version ) > in CentOS from its binaries. > > most recent stable version is 9.0.2. here you will find Yum instructions and links to RPM packages http://yum.pgrpms.org/howtoyum.php see also

Re: [GENERAL] Changing WAL Directory in Postgres

2010-12-15 Thread Filip Rembiałkowski
in short: sudo su - postgres pg_ctl stop -m fast cd $PGDATA mv pg_xlog /another/device ln -s /another/device/pg_xlog . pg_ctl start 2010/12/15 Adarsh Sharma > Hi all, > > From the last 2 days I am researching on Performance Tuning in Postgres. > > For this , I have to change my WAL directory t

Re: [GENERAL] crosstab function

2010-12-14 Thread Filip Rembiałkowski
r by > productname') > as rpt(customername text,"ATX" int, > "CM-A510" int, > "CM-F82" int, > "CM-i586" int, > "CM-i686B" int, > "CM-i686M" int, > "CM-iAM" int, > "CM-iGLX" int, > &

Re: [GENERAL] crosstab function

2010-12-14 Thread Filip Rembiałkowski
please show - source data structures (in form of CREATE TABLE please) - actual whole query that creates duplicates 2010/12/14 Sim Zacks > postgres 8.2.17 > > I am trying out the crosstab function (tablefunc contrib) for reporting > needs and I'm having a problem. > I have customers and pro

Re: [GENERAL] pg_dump order of rows

2010-12-11 Thread Filip Rembiałkowski
2010/12/11 jan > we are seeking for a solution to make the dumop (e.g. the backup) more > random > Can you please explain why? ( just curious, this seems a very strange requirement ) you _could_ _try_ to use postgres feature of synchronised seqscans to achieve this, but I'm not sure if it will

Re: [GENERAL] Group by and lmit

2010-11-03 Thread Filip Rembiałkowski
ect exec('create temp sequence tmpseq'||x) from (select distinct x from mytable) q; select x,y,counter from (select x, y, count(*) as counter from mytable group by x, y order by x, counter, y) subq where nextval(quote_ident('tmpseq'||x))<=5; -- Filip Rembiałkowski J

Re: [GENERAL] JDBC Transactions

2010-11-01 Thread Filip Rembiałkowski
ork really well, with no locking at all.  You could read up on MVCC >> is you were interested. >> >> Without knowing what sql you are running, I can _totally guarantee_ it'll >> work perfectly with NO table locking.  :-) >> >> -Andy > &g

Re: [GENERAL] Why so many xlogs?

2010-11-01 Thread Filip Rembiałkowski
2010/11/1 hubert depesz lubaczewski : > as I understand, max number of xlog files in pg_xlog should be ( 1 + 2 * > checkpoint_segments ). why? for a server overloaded with R/W transactions, it's possible to go beyond this. checkpoints just do not keep up. right now I have an 8.3 with checkpoint_

Re: [GENERAL] Linux x Windows LOCALE/ENCODING compatibility

2010-11-01 Thread Filip Rembiałkowski
ble with all client encodings. you will get compatible bahaviour for your existing apps with SET client_encoding TO 'whatever'; /* this can be entered as pre-SQL on every client connection */ see http://www.postgresql.org/docs/8.4/static/multibyte.html, 22.2.3. Automatic Character

Re: [GENERAL] PostgreSQL performance

2010-08-30 Thread Filip Rembiałkowski
rstRand Bank's Disclaimer for this email click on the following > address or copy into your Internet browser: > https://www.fnb.co.za/disclaimer.html > > If you are unable to access the Disclaimer, send a blank e-mail to > firstrandbankdisclai...@fnb.co.za and we will send

Re: [GENERAL] Restore referencial integrity

2010-08-30 Thread Filip Rembiałkowski
gn key is not present in table > "posics." Then re-issue the foreign key constraint. Then unlock the > table or whatever it is you have to do get programs to be able to use > the tables again. > > I hope this helps somewhat. > -- > George H > george@gmail.com > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Wysłane z mojego urządzenia przenośnego Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/ -- 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] searchable book database

2010-08-21 Thread Filip Rembiałkowski
gt;> > python...) >> > >> > Thanks. >> > >> > MV >> >> Don't knopw if that's what you need but you can setup a DocManager >> site. Check it at >> http://wiki.docmgr.org/index.php/DocMGR_-_Document_Management and see >> if it fills your

Re: [GENERAL] Monitoring activities of PostgreSQL

2010-06-16 Thread Filip Rembiałkowski
2010/6/15 Allan Kamau > I do have a PL/SQL function that gets executed called many times but > with different parameter values each of these times. For most > invocations of this function run in a couple of seconds however some > invocations of the same function run (on the same dataset) for hour

Re: [GENERAL] Connection's limit in SCO OpenServer 5.0.7 and pg 8.3.11 (no more than 94 connections)

2010-06-04 Thread Filip Rembiałkowski
highly appreciated! > > > regards. > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Wysłane z mojego urządzenia przenośnego Filip Re

Re: [GENERAL] Formatted reports

2010-05-07 Thread Filip Rembiałkowski
2010/5/7 Sorin Schwimmer : > Hi All, > > Is there in PostgreSQL an equivalent of Oracle's BREAK/COMPUTE reporting > feature? No, there isn't. You need some procedural language function, or use external tool to accomplish this. There are free reporting engines. jaspersoft, pentaho, BIRT, ... [[

Re: [GENERAL] Indexing queries with bit masks

2010-05-01 Thread Filip Rembiałkowski
2010/4/30 Mike Christensen : > Ok I've been blatantly lying, err, purposely simplifying the problem for the > sake of the original email :) > > I've read over the responses, and am actually now considering just not using > any index at all.  Here's why: > > First, this actually isn't the only thing

[GENERAL] lc_ctype does not work on windows ?

2010-04-27 Thread Filip Rembiałkowski
23 encoding | 6 datcollate| Polish, Poland datctype | Polish, Poland datistemplate | f datallowconn | t datconnlimit | -1 datlastsysoid | 11563 datfrozenxid | 649 dattablespace | 1663 datconfig | datacl| -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@g

Re: [GENERAL] Accessing Windows install of PostgreSQL via cygwin

2010-04-01 Thread Filip Rembiałkowski
neral mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Wysłane z mojego urządzenia przenośnego Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/ -- Sent v

Re: [GENERAL] optimizing import of large CSV file into partitioned table?

2010-03-28 Thread Filip Rembiałkowski
uld rather split the CSV input (with awk/perl/whatever) before loading, to have one backend for each partition loader. > And finally the constraint should probably be applied > after too, so cull any violating rows after importing. +1 -- Filip Rembiałkowski JID,mailto:filip.rembialkow..

Re: [GENERAL] strange

2010-03-23 Thread Filip Rembiałkowski
> You've got a machine where gettimeofday() is really slow.  This is > common on cheap PC hardware :-( > >                        regards, tom lane > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > htt

Re: [GENERAL] Creating a view: ERROR: rules on SELECT must have action INSTEAD SELECT

2010-03-23 Thread Filip Rembiałkowski
le, how do I do something > similar for optimization reasons (ie pretend "two+three as five" is > some very expensive operation and "two" and "three" were also > expensive operations)? > > -- > Sent via pgsql-general mailing list (pgs

Re: [GENERAL] how to remove super user

2010-03-11 Thread Filip Rembiałkowski
t; this? > > Thanks for reading. > > > BE-langrijk nieuws! Nu ook @hotmail.BE-adressen in België. Klik en creëer -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/ -- Sent via pgsql-general mailing list

Re: [GENERAL] problems maintaining boolean columns in a large table

2010-02-11 Thread Filip Rembiałkowski
e the INSERT. Bound > to be more efficient ways to do it, but it works. > > better use INSERT INTO needs_indexing (article_id) SELECT NEW.id WHERE NOT EXISTS ( SELECT 42 FROM needs_indexing WHERE article_id = NEW.id ); -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/

Re: [GENERAL] error migrating database from 8.4 to 8.3

2010-02-11 Thread Filip Rembiałkowski
ely the same. > > The only difference is that the database comes from a 8.4 installation and > the server is 8.3 > > Please help solving this locale issue. > > thanks! > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your

Re: [GENERAL]

2010-02-08 Thread Filip Rembiałkowski
this one: http://www.enterprisedb.com/products/pgdownload.do#windows > secondly has anyone had experience on working both on geoserver and > postgresql(POSTGIS) how do i interrelate them > no experience here, but http://docs.geoserver.org/2.0.x/en/user/ seems helpful. > > jehanzeb &g

Re: [GENERAL] About partitioning

2010-01-20 Thread Filip Rembiałkowski
W dniu 20 stycznia 2010 12:01 użytkownik Grzegorz Jaśkiewicz < gryz...@gmail.com> napisał: > please use search before asking. > please use search before advising to use search; it's not so easy to find. can you share a link to archived post? Filip

Re: [GENERAL] log_temp_files confusion

2010-01-13 Thread Filip Rembiałkowski
W dniu 13 stycznia 2010 19:52 użytkownik Andrej napisał: > 2010/1/14 Filip Rembiałkowski : > > I would like to log usage of temporary files for sort/join operations, > but > > only when size of these files exceeds some threshold. > > > > So I set in

[GENERAL] log_temp_files confusion

2010-01-13 Thread Filip Rembiałkowski
Why is postgres logging these operations? How is this threshold calculated at run time? TIA -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/

Re: [GENERAL] What happens when you kill the postmaster?

2010-01-13 Thread Filip Rembiałkowski
ll) can make some damage to the database. see http://www.postgresql.org/docs/8.4/static/app-postgres.html forfull explanation > Thanks. > > Ralf Schuchardt > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscripti

Re: [GENERAL] annahensjerry has [OT]

2010-01-12 Thread Filip Rembiałkowski
2010/1/12 annahensjerry To: pgsql-general@postgresql.org > From: annahensjerry > > Hello, > (...) waiting for the love.I am Miss anna > This miss is going to love quite a bunch of fellows, isn't she? And this is good: > Weebly values your privacy. I guess they won't gain many fans of Weeb

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread Filip Rembiałkowski
above are the author's, not those of his employers or colleagues] > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/

Re: [GENERAL] pg.dropped

2010-01-08 Thread Filip Rembiałkowski
writes: > > INSERT INTO thetable ( ... ) VALUES ( ... ); > > ERROR: table row type and query-specified row type do not match > > If you want any help with this you need to show a *complete* example > of how to produce this failure. > > regards, tom l

[GENERAL] pg.dropped

2010-01-07 Thread Filip Rembiałkowski
tch DETAIL: Physical storage mismatch on dropped attribute at ordinal position 69. Any clues / hint how to NEVER get into this again? TIA. -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/

Re: [GENERAL] using a function

2010-01-06 Thread Filip Rembiałkowski
as fhrs from ids; note: declare your function volatility - see http://www.postgresql.org/docs/8.4/static/xfunc-volatility.html note: in above example, a VIEW would be enough. -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/

Re: [GENERAL] Large tables, ORDER BY and sequence/index scans

2010-01-05 Thread Filip Rembiałkowski
to "chunked" processing, like this: SELECT * FROM bigtable ORDER by idxcol LIMIT 1000; (process the records) SELECT * FROM bigtable WHERE idxcol > [last idxcol from previous fetch] ORDER by idxcol LIMIT 1000; ... and so on. pozdrawiam, Filip -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/

  1   2   3   >