not using WAL archiving only streaming.
And server4 is behind server3.
So would we need to setup WAL archiving to achieve this?
- TJ
On 22/05/13 23:22, Heikki Linnakangas wrote:
On 22.05.2013 10:23, TJ wrote:
I am looking to migrate my databases from one set of hardware to another
all the
.2,FreeBSD 9.1, Streaming replication and WAL
log archiving.
Thanks
TJ
I just discovered that SuSE provides the sample pg_hba.conf in
/usr/share/pgsql
but the real pg_hba.conf file is located in
/var/lib/pgsql/data
Fixed!
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if
isting then perform the insert" takes 25
minutes. Is there a better way?
--
TJ
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
r than databases, in that should disk
corruption occur, most of the mail is likely to be unaffected, and any
that is damaged can usually be recovered."
How naive (optimistic?) is it to think that "the database" can
replace "the filesystem"?
TJ O'Donnell
http://www.g
I think decode('your string', 'escape') might be what you need.
It returns bytea when 'your string' is type text or varchar.
TJ
http://www.gnova.com
Is there a function that will do what I want to convert the datatype
without having to create a CAST that PostgreS
imensional arrays in plpython?
TJ O'Donnell
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
a fn that
returns integer[]
AND I can't return a two-dimensional array. Not a happy 9.0 camper.
Anyone know of any plans to 9.0 plpython to support multi-dimensional arrays?
TJ O'Donnell
On Tue, Dec 21, 2010 at 4:02 PM, Adrian Klaver wrote:
> On Tuesday 21 December 2010 3:25:48
I use arrays of integers, double or numeric, and text.
They are 1 or 2 dimensional.
They are usually limited to <100 elements in
one dimension and <10 in the other.
TJ O'Donnell
http://www.gnova.com
---(end of broadcast)---
TIP 1:
This is a very cool animation for your
amusement, amazement and edification.
http://www.vimeo.com/1081680
TJ O'Donnell
http://www.gnova.com/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/
(val) from x;
select array_agg(val) from x;
Well, everything works except the last statement. In 8.4 I get
ERROR: could not find array type for data type integer[]
I was hoping for [1,2,3,4,5] or at least [1,2,3,3,4,5] or even [[1,2,3],[3,4,5]]
Am I not understanding something?
Thanks,
TJ O'Do
or even 1 and 0?
Of course I can do this for an individual query using appropriate functions, but
it would help me to be able to modify the default behavior.
TJ
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
json_encode. I'm all set now.
Thanks for the help!
TJ O'Donnell
On Thu, Sep 23, 2010 at 1:18 AM, Raymond O'Donnell wrote:
> On 23/09/2010 02:00, Adrian Klaver wrote:
>>
>> On Wednesday 22 September 2010 5:40:55 pm David Wilson wrote:
>>>
>>> On W
should use https, and not hard-code
passwords...all the usual security precautions.
Anything ready? Hard to say without knowing more about your
specific needs.
TJ O'Donnell
http://www.gnova.com
I'd like to launch some sql script asynchronously from a web app and
have some kind of feed
It seems you haven't done anything you need to save, so why
not save time and just reinstall postgres?
TJ
Hi
Â
I started the installation of postrgres got distracted and then started again but forgot my password
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To
can I pass bit varying data to a c-language function? I can't find any
docs or examples of that.
3) are bit strings stored as actual bits or as character strings of 0 and 1?
Thanks,
TJ
---(end of broadcast)---
TIP 2: you can get off all lists at
d write the others,
but I want to ask if functions like these already exist (and I
just can't find them)? Does anyone have any ideas about how to
use combinations of existing functions (shifts, ands, etc.) to do
these functions? The bit strings I am interested in r
to grant. The user owns the
database, by the way, but still can't create the function. The user only
needs to create C functions for her own database(s).
TJ
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
get an error from postmaster that my.so cannot be loaded because
function x cannot be found.
If I reverse their.a their2.a in the link command, all is well.
Note: I never use, nor even knew about the exitence of function x() - "they" do.
Any help on how to make this more pain-free?
TJ
M
oes a dynamically loaded .so get unloaded?
I want to avoid preloading .so's at server startup, but also avoid dynamically
loading them for ~every~ session.
TJ
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
I know of the four user's group listed at http://pugs.postgresql.org/
I'm interested in starting one in the San Diego area.
If there are others in San Diego who are interested,
please get in touch with me.
Thanks,
TJ O'Donnell
[EMAIL PROTECTED]
---(e
use that would disallow inserting a name into
the master table unless another table by that name already exists?
And what could ensure that a table would not be renamed or dropped
unless the master table is changed?
TJ
---(end of broadcast)---
TIP 5
> TJ O'Donnell wrote:
>> I have many different tables that I want to keep track of.
>> So, I thought of a master table with those table names in it.
>> But, to maintain this (suppose a table changes
>> its name, gets dropped) I want to have some kind of referentia
7;s an idea.
That is a great idea! And you examples were very helpful. I think this
will get me what I need.
Thanks,
TJ
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
/usr/local/bin
where I can get the current value and just append to it.
TJ
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
messa
other databases/sessions?
When a session ends that had opened my database, do all traces of it disappear,
except its life on disk? How about .so's it might have caused to be loaded?
TJ
---(end of broadcast)---
TIP 3: Have you check
Alvaro Herrera wrote:
On Mon, Aug 15, 2005 at 01:15:03PM -0700, TJ O'Donnell wrote:
While writing installation instructions for my new PostgreSQL product, I
found myself
writing the following sentence:
"For first time users, we recommend building the gnova database,
since it has
hange? minor? I suppose
the wise thing is to recompile with ANY pg version change.
Thanks,
TJ
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
i in the text range, one could
say there is a text equivalent, but in general not.
I think you're looking for some kind of printf-type %b function? Maybe
someone has written one, or maybe you'll have to do so. If you do,
how about a hex representation of bit(n) - I could use th
use dynamic loading of my .so,
each session is independent, with its own static variables.
Will the same be true if I were to load the .so once when
the database starts up? Or will there be just one set of
static variables for all sessions?
TJ
---(end of broadcast
same be true if I were to load the .so once when
the database starts up? Or will there be just one set of
static variables for all sessions?
TJ
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
will be faster)?
Declare x real;
Begin
x = cast($1 as real);
Return x;
Exception
When OTHERS Then
Return NULL;
End;
Thanks,
TJ
On a side note, do you really want to punt to 0 when an invalid value
comes it? That sounds like something MySQL would do... ISTM you should
throw an error.
I would unix su, edit pg_hba.conf to allow open access
temporarily, connect to pg and change the posgres password.
Don't forget to change pg_hba.conf back again to password
protect the db!
TJ
I have lost the superuser (user postgres) password, but I still have
the unix root password. Is
data.
bitmask is precomputed/stored as bit(1024) = fingerprint(datacolumn)
contains(a,b) returns bool as 'select b=(a&b);'
This works well because matches() is an expensive functions.
But it would work better if bitmask could be indexed, no?
TJ O'Donnell
s back into a R dataframe.
There is a nice way to dump a dataframe back into a table which
is created for you, with columns and datatypes as appropriate.
Hope this helps.
TJ O'Donnell
http://www.gnova.com/
I'd like to get R to talk to postgresql, but my head's spinning among a
web of
reason. I can also
have tables that are sub-classes of the original table.
TJ
http://www.gnova.com/
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
particular table, it would contain regular keys that point
back to whatever table::record is its source.
I was thinking of using two keys only:
xmOwnerInfo
COL1 PK* oidParentTable
COL2 PK* oidParentTablesRecord
COL3-15 [attribs]
Thoughts?
--
TJ Talluto
torpedo51 at yahoo dot com
Since nobody has mentioned any nuances about mapping these keys to system
tables in this particular database, I'll assume this is a good idea for
now.
--
TJ Talluto
torpedo51 at yahoo dot com
---(end of broadcast)---
TIP 4: Don't
ese details from the user - meaning
they would not have to create/update these additional columns?
Thanks,
TJ O'Donnell
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
table related to the table containing the smiles - and all
behind the scenes so the sql user is unaware of this.
My thought was that an index is like that and I might borrow some
of the internal uses of indexing for my purposes.
TJ O'Donnell
[EMAIL PROTECTED]
Pierre-Frédéric Caillaud wrote:
ion.
It is analogous to regexp matching, except that the semantics
of oe_matches is nothing at all like string matching, even though
smiles is actually a character string. Character string smiles
are simply an extenral representation of a more complex c++ molecular
structure object.
TJ
Pierre-Fré
>,LIKE?)
to do the matching. A c-function is simply called with data and
would have no access to indexes, correct?
TJ
Pierre-Frédéric Caillaud wrote:
Well, first and easy thing you can do is create a column to store
the parsed representation and update it via a trigger when the
original, un
and require the
user to pass me the parsed_smiles column for quick searches.
And the user could maintain the parsed_smiles in a separate
table, if he so desired, with foreign key relations.
Thanks to everyone for all your advice. This is my first
postgresql project and I'm liking what I've
-column index. In other words, do my
multi-columns sufficiently but not overly discriminate rows from each other?
Do I have too many with the same index? (not enough branches)
Do I have a unique index for each row? (way too many branches)
Thanks,
TJ
---(end of broadcast)-
timal situation where there is not one index for
all rows
and also not a unique index for every row - something inbetween would be ideal,
or is that basically a wrong idea?
TJ
> Useful explanation of PostgreSQL index format:
> http://www.faqs.org/docs/ppbook/c13329.htm
>
> I think y
ciently, even when it is a perfectly ordinary row with no ONE
feature being distinctive, but rather several features together giving
it it's distinctive character. That is my interpretation of the
multi-column index.
TJ
PFC wrote:
I think you missed an important "feature" of multicolu
actual
time=8050.437..42117.062 rows=1569 loops=1)
Filter: (_c >= 30)
Total runtime: 42133.746 ms
TJ
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
the histograms that Analyze creates?"
Are they available anywhere? The docs mention them (bins) and I
was hoping Analyze Verbose would show them to me.
TJ
Tom Lane wrote:
"TJ O'Donnell" <[EMAIL PROTECTED]> writes:
This I don't get. Why is an index scan not used? Isn
stand why my searches are speeding
up so I can make it happen the first time, if possible?
Thanks,
TJ
Try #1:
Select distinct smiles from structure where (_c, _o, _arom_c, _c_double, _o_double, _n, _ring_c, _ring_hetero, _halogen,
_n_double, _arom_n, _s, _s_double, _other_atoms, _c_triple, _n_tripl
ny default user/password?
Is this an issue we should be concerned about, at some level?
TJ O'Donnell
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
decode(your_string,'escape') will convert text to bytea
You can just use this as a sort of type cast, or:
1. Create a new bytea column in your table
2. Update the table, setting the newcolumn = decode(oldcolumn,'escape')
3. Drop the oldcolumn (or not)
TJ
Date: Wed, 01 Feb
any purchases were intended simply to
confuse
people about the future of MySQL and therefore ecourage them to select Oracle?
TJ O'Donnell
http://www.gnova.com/
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Slashdot had this today.
http://searchopensource.techtarget.com/originalContent/0,289142,sid39_gci1172668,00.html
TJ O'Donnell
www.gnova.com
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desi
my func is rather expensive. Is func(x) evaluated three times
in the above statement? Would it be evaluated only once if I used
select func(x)group by 1 order by 1
TJ O'Donnell
www.gnova.com
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
erformance diminishes with large tables
(we’ll be going to upwards of hundreds of millions of rows)."
Is this pure speculation, opinion, known fact?
Does anyone know of measured performance of postgres
vs. oracle, specifically with very large tables?
TJ O'Donnell
www.gnova.com
--
7.4.8 or even 7.4.12? Can I assume that header
file changes only occur between major pg changes, such as
7.3 to 7.4, or 8.0 to 8.1?
TJ
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
"TJ O'Donnell" <[EMAIL PROTECTED]> writes:
Presumably, the only reason I would HAVE TO recompile
is when some header file changes. Is there any guarantee
that header files DO NOT change, for example from
7.4.5 to 7.4.8 or even 7.4.12? Can I assume that header
fi
and my orsum without INITCOND returned the proper OR of the remaining values
when including all rows in the aggregate. it did not return null.
maybe the aggregator (whoever,whatever that is) handles null args differently,
not calling the func when the arg is null?
pg8.1.3
TJ
Florian G. Pf
o utf8. I did the following:
pg_dump -p 5433 --encoding ISO_8859_7 -t cas tj |psql tj
where the dump connected to 7.4 (port 5433) and interpreted the
cas data using ISO_8859_7. psql connected to 8.1
I had to experiment to find that ISO_8859_7 was the "proper"
encoding - i had some g
hing more in favor of
% index scans.
Also, increasing effective_cache_size.
(And increasing statistics...)
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
c
you don't even have to shut down the db.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
only) need to rebuild the affected indices.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
andard order by clause (that is, without writing a new SQL function)?
You can use a case statement in the order by clause
order by case when field = '0' then 4
when field = '1' then 1
when field = '2' then 0
when field
t casts to work, the type's
OID has to be listed in that function (i.e., it has to be a built-in type).
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an
In article <[EMAIL PROTECTED]>,
Tom Lane <[EMAIL PROTECTED]> wrote:
% [EMAIL PROTECTED] (Patrick TJ McPhee) writes:
% > One problem with this idea is the treatment of implicit casts between
% > numeric types in TypeCategory(). For implicit casts to work, the type's
% > OI
In article <[EMAIL PROTECTED]>,
Sabin Coanda <[EMAIL PROTECTED]> wrote:
[...]
% So, what is better from the postgres memory point of view: to use temporary
% objects, or to use common variables ?
Temp tables can cause serious bloat in some of the system catalog tables.
--
Patri
w, there's no way to construct a random ctid in a stock
postgres database, but apart from that it seems like a good plan. If
efficiency is important, you could create a C function which returns a
series of random tids and join on that.
--
Patrick TJ McPhee
North York
you try to start the database with a postmaster compiled with the
wrong block size, the error message tells you what block size you need.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 4: Have you searched
he closest you can get is to store the tz in a different column
% and use AT TIMEZONE (which accepts a column name as argument)
% Or use date + time with time zone.
This could cause problems if you want to insert a timestamp for a date
with different DST settings. It also seems a lot more cumbersom
the ones where the
columns aren't all nulls. You look up 90 rows in attribute_value, then
90 rows in attribute, then 90 rows in value. You're probably looking at
3-6 pages of index data, and then somewhere between 3 and 270 pages of
data from the database, for one logical row of data.
--
ck size to the filesystem block size,
particularly if the filesystem blocks are larger than 8k. It's
not exactly a lot of trouble to set it up, assuming you compile the
database yourself anyway, and it allows the database to do a better
job of I/O management.
--
Patrick TJ McPhee
North Yor
7;;
DROP TABLE log_old;
COMMIT;
I believe this will keep the writers writing while keeping the efficiency
of truncating.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
rt these files to
% INSERT-type SQL to run them through psql.. Is there a way one can
% specify a table structure with raw field widths and then just pass it a
% flat file?
pg_loader is supposed to handle this.
http://pgfoundry.org/projects/pgloader
--
Patrick TJ McPhee
North York Canada
sn't required any more (i.e., the same
command works with or without the -w flag). I'm not sure the docs should
change, since -w is still required at least on NetBSD.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
--
Sent via pgsql-general mailing list (pgsql-general@po
posix shell).
Note that there are no spaces around the equals signs.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 8: explain analyze is your friend
you're clearing out all the data for a set of tables, drop them and
recreate them.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
In article <[EMAIL PROTECTED]>,
Daniel Schuchardt <[EMAIL PROTECTED]> wrote:
% but there it is only clear that Postgres is based in Ingres. But i also
% don't know what Ingres means.
Ingres was a Spanish painter. Not every name has to mean something.
--
Patrick TJ McPhee
N
rom locations
where id in (select distinct location from pa union
select distinct location from andu union
select distinct location from idu);
this query might be helped by an index on location in each of those
three tables, but probably not.
--
Patrick TJ McPhe
('alpha');
INSERT 194226 1
$ INSERT INTO x VALUES ('alpha');
INSERT 194227 1
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
d. Typically,
someone wants to know when a particular field held a particular value,
and you need an audit table for that.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
x27;t you want to have an entry in the department table with
NULL for the department ID? I mean, why should NULL act like NULL wrt
foreign keys, but not wrt unique constraints?
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)
be easily transformed to the XML you really want.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
as constraintname
% from pg_constraint c join pg_class t on (c.conrelid = t.oid);
or, perhaps simpler,
select * from information_schema.table_constraints
where constraint_type = 'PRIMARY KEY';
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
child dirs etc, what I assume are it's parts) to
% what amounts to the same location:
%
% c:\postgresql\data\base\16404
As several people have pointed out, this will not work. You can copy
c:\postgresql\data and everything under it, but you can't copy
individual subdirectories
;
You can perform per-user initialisation with
alter user set session.myid = 23;
Which allows the value to persist between sessions.
I haven't done anything with this idea so I can't say how well it
works or whether there are downsides to it.
--
Patrick TJ McPhe
peless
databases in the first stage of that sort of application.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
27;t want to introduce
them into a stable environment.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
ace.oid and
pmcphee-# nspname like 'pg_temp%';
pg_table_is_visible
-
f
(1 row)
If I go on to create the temp table in the current session, this returns
pg_table_is_visible
-
f
t
(2 rows)
so you need to be ready for more than one row
e DO ALSO rules involving OLD didn't do so well here.
The section on rules v. triggers could do with a caveat or two, but
it's a bit much to call them "fundamentally dangerous".
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of bro
ow if there is a fix available?
% >
% > Thanks
%
% I have seen discussion about adding PG_MODULE_MAGIC to .c or .h code.
% Does anyone have suggestion about where I should add this to tsearch2
% code, and how should I rebuild tsearch2 with this?
Probably the easiest thing is to use the tsear
e postgres server
with table files from a different postgres server. If you need to
do something like that, the answer is to use replication to move
the data over as it changes.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)
In article <[EMAIL PROTECTED]>,
Harry Jackson <[EMAIL PROTECTED]> wrote:
% I am not aware of Oracle etc having a seperate company that sells
% replication on top of their database although I could be wrong.
There's more than one third-party replication offering for Oracle.
--
manent table)?
If there's data in the table, you could "select tableoid from session_data
limit 1", then check the namespace corresponding to that table.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)-
In article <[EMAIL PROTECTED]>,
Jim Nasby <[EMAIL PROTECTED]> wrote:
% Not sure if it's still true, but DB2 used to limit varchar to 255. I
% don't think anyone limits it lower than that.
Sybase: 254. Silently truncates.
--
Patrick TJ McPhee
North York C
lename
;
No arrays are hurt by this query.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
he order in which they're stored on disk.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
below
variables need to be space-delimited in \ contexts. Work-around:
\set tn 'foo_' :date
\echo :tn
create table :tn();
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 1: if posting/rea
I'm not sure a static variable is the right way to achieve this, but
you could use a custom_variable_class for this. Add this to your
postgresql.conf:
custom_variable_classes='global'
Then you can set and show variables prefixed by global.:
set global.success = 'true'
the question: Is it just as
% fast to do it this way, or is there some hidden advantage to performing an
% update?
If you have foreign key relationships to the table being updated, then
deleting from that table will often be slower than updating.
--
Patrick TJ McPhee
North York Canada
[EMA
structure of an item for an index page might be different, though.
I found there was enough information in the section you cite to write a
simple data dumping tool in an emergency a while ago.
--
Patrick TJ McPhee
North York Canada
[EMAIL PROTECTED]
---(end of broadcas
1 - 100 of 105 matches
Mail list logo