[HACKERS] question: data file update when pg_basebackup in progress

2017-04-25 Thread Rui Hai Jiang
Hello, I'm checking how the pg_basebackup works and I got a question(maybe there are no such issues): When pg_basebackup is launched, a checkpoint is created first, then all files are transferred to the pg_basebackup client. Is it possible that a data page(say page-N) in a data file is change

Re: [HACKERS] how is the WAL receiver process stopped and restarted when the network connection is broken and then restored?

2016-06-23 Thread Rui Hai Jiang
Thank you Craig for your suggestion. I followed the clue and spent the whole day digging into the code. Finally I figured out how the WAL receiver exits and restarts. Question-1. How the WAL receiver process exits === When the network connection is bro

[HACKERS] how is the WAL receiver process stopped and restarted when the network connection is broken and then restored?

2016-06-22 Thread Rui Hai Jiang
Hello, I have one Primary server and one Standby server. They are doing streaming replication well. I did some testing. I broke the network connection between them for a few minutes, and then restored the network. I found the both the WAL sender and WAL receiver were stopped and the restarted.

[HACKERS] If SyncRepWaitForLSN() fails, would the postgres backend do a roll-back?

2016-06-08 Thread Rui Hai Jiang
Hi, I'm researching the synchronous replication. I see the backend of the Primary Server calls SyncRepWaitForLSN() to wait for the Standby Server to write the WAL records. If some thing happens, such as network failure or disk failure, causes the Standby Server fail to receive WAL records or fail

[HACKERS] Could the configure script detect the endianness for a Power CPU with endianness mode change

2015-09-15 Thread Rui Hai Jiang
Hello, Some Power CPU can switch the endianness mode. If one such CPU switches from big endian to little endian, could the configure script detect the real endianness mode? Thanks, Rui Hai

[HACKERS] how is a query passed between a coordinator and a datanode

2015-06-23 Thread Rui Hai Jiang
Hello, I'm trying to figure out how a query and its result is passed between a coordinator and a datanode. I know there are many messages passed between them to finish a query. I did a test against the coordinator by adding a row to a table and the sql was, insert into hg1(id, name) values

[HACKERS] when are the xxxin() functions called

2015-05-07 Thread Rui Hai Jiang
Hello, I'm trying to figure out when the following functions are called, charin() int2in() int4in() textin() I used GDB for debuging. I set break points at each function and I did following testing. create table abcin( id integer, name varchar(10), title text); insert into abcin( id, na

[HACKERS] Where are the detoast function called in select * from table_name case?

2015-05-06 Thread Rui Hai Jiang
Hello, I've been reading the PostgreSQL code for weeks to figure out how TOAST works. I couldn't find where are the TOAST function called to detoast a tuple comes from a select query, for example, select * from table_name. Does anyone know this? Can you give me some help? And any help would sa